rails/rails — Issue #4755: Mass Assignment error with association
Author: MMore
Created: 2012-01-30 09:34:08+00:00
State: open

I enabled application wide whitelist via `config.active_record.whitelist_attributes = true`. So every model has automatically an empty whitelist.

Now with the release of Rails 3.2 there is a setting to raise an exception on mass assignment protection. If enabled I got an exception using an association to build objects.
Mass assigment doesn't allow to build associated objects when association_id is protected. Disabling the application wide whitelist solves the problem.

https://github.com/rails/rails/issues/4051 describe the problem with an example.