Its not in the API description for ActiveRecord::Base, but it is
mentioned in the source code for attr_protected.
#protected_attributes returns an array of the attributes that are
protected.
--Kip
Kip wrote:> I''m adding some meta-methods to a plugin and would really like to
be
> able to know if an attribute is protected or not in my model.
> Unusually, googing hasn''t turned up an answer. I know I could
try an
> assignment and then rescue the exception (assuming the default whiny
> behaviour is on) but thats not a pleasing approach.
>
> Thanks for any help or pointers,
>
> --Kip
--~--~---------~--~----~------------~-------~--~----~
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
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---