regression: attr_accessible is added to all models
josh-m-sharpe opened this issue · comments
Isn't this a regression?
In rails 3 attr_accessible was not added to all models, but with this gem, in rails 4, it is... Sure, this might be a "Best practice" but I thought this gem was supposed to be a kludge to keep the same behavior that was supported in rails 3 around in rails 4 - which helps support the upgrade path.
Now, with this gem, that behavior has changed. So updating a legacy rails 3 app to rails 4 forces breaking changes.
Should this new behavior be configurable?
For anyone interested, I 'fixed' this issue by adding this in an initializer:
class ProtectedAttributes::Railtie
def initializers_for
[]
end
end
Can't you just set config.active_record.whitelist_attributes
to false in your application?
@rafaelfranca yes :/
The default is true since some patch version of 3.2, this gem is just using the same default.