Reputation: 5981
Did RoR4 will set by default config.active_record.whitelist_attributes to true and some other securities values ?
Now I think RoR is enough simplified to integrates this kinds of constraints for securities reasons.
Thanks
Upvotes: 4
Views: 1969
Reputation: 7122
...and it's gone. This is likely going to stay given Rails 4 has abstracted attr_accessible
into a gem.
Upvotes: 3
Reputation: 40277
As of now, yes -- check it out:
# Enforce whitelist mode for mass assignment.
# This will create an empty whitelist of attributes available for mass-assignment for all models
# in your app. As such, your models will need to explicitly whitelist or blacklist accessible
# parameters by using an attr_accessible or attr_protected declaration.
<%= comment_if :skip_active_record %>config.active_record.whitelist_attributes = true
Upvotes: 4