Ignore unsent options in Rails 4

I have some Backbone models with many deeply nested attributes.

Before I saved these models, I had no problems, but I recently upgraded to Rails 4 and started using strong options. Now I get the error found unpermitted parameters .

attr_accessible just ignore parameters that were not skipped, but I think strong parameters work differently?

Is there a way to make Rails just ignore the unlisted parameters and just update the parameters that are allowed?

Removing all incomplete parameters from my Backbone model will be a huge pain.

+6
source share
1 answer

Turns out I had the following in config/environments/development.rb :

 config.action_controller.action_on_unpermitted_parameters = :raise 

As soon as I deleted this, I was fine as the default value :log

+6
source

All Articles