I need to add some mass assignment protection (ala
ActiveModel::MassAssignmentSecurity) but I can't find how to do it
contextually. For example, in one controller action I want to to
whitelist attributes x, y and z and in another I want to whitelist
attribs y and z. How can I do that? The attr_accessible function has a
class-wide scope, whether in a model or in a controller. But I would
like to whitelist mass attribute assignment attributes in a more
granular context.

Some helpful resources:

https://rails.lighthouseapp.com/projects/8994/tickets/3178-mass-assignment-security-refactoring
http://api.rubyonrails.org/classes/ActiveModel/MassAssignmentSecurity/ClassMethods.html

Thanks!

Shimon

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to