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