method
attr_accessible
v1.0.0 -
Show latest stable
- Class:
ActiveRecord::Base
attr_accessible(*attributes)public
If this macro is used, only those attributes named in it will be accessible for mass-assignment, such as new(attributes) and attributes=(attributes). This is the more conservative choice for mass-assignment protection. If you’d rather start from an all-open default and restrict attributes as needed, have a look at attr_protected.