我收到此错误:
/Applications/MAMP/htdocs/clippo2/app/controllers/projects_controller.rb:31: syntax error, unexpected ',', expecting => ...:user_id => [1], :instructions, :max_duration, :active, :max... ... ^
在尝试实现 Rails 4 强参数时使用此方法:
private
def project_params
params.require(:project).permit(:user_id => [1], :instructions, :max_duration, :active, :max_videos, :hashed_id)
end
我究竟做错了什么?