質問

I have some Backbone models with lots of deeply nested attributes.

Before when I saved these models, I had no problems, but I recently updated to Rails 4 and started using strong parameters. Now I'm getting a found unpermitted parameters error.

attr_accessible simply ignored unpermitted parameters, but I guess strong parameters works differently?

Is there any way to make Rails simply ignore the unpermitted parameters and just update the parameters that are permitted?

Removing all the unpermitted params from my Backbone model would be a giant pain.

役に立ちましたか?

解決

It turns out I had the following in my config/environments/development.rb:

config.action_controller.action_on_unpermitted_parameters = :raise

Once I removed that I was okay, as the default setting is :log

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top