Reputation: 43153
This is a fairly simple thing, but since Rails 3.2 mass-assignment protection is enabled by default, is there a way to make rails raise an exception in dev or test when you try to set a protected attribute via mass assignment?
Upvotes: 0
Views: 69
Reputation: 8934
in development.rb, the following is commented out by default. uncomment it.
config.active_record.mass_assignment_sanitizer = :strict
Upvotes: 1