Forum: Ruby on Rails :attr_accessible to protect all attributes

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Fernando P. (Guest)
on 2008-12-28 18:14
Hi,

I would like to protect all the attributes of one of my model. This
ticket talks about this issue: http://dev.rubyonrails.org/ticket/9631 ,
and a patch to the documentation was submitted:
http://dev.rubyonrails.org/changeset/8032 , which actually states that
defining :attr_accessible alone, means all attributes are protected.

However when I look at the rails API page for attr_accessible, I can't
find the documentation about that:
http://api.rubyonrails.org/classes/ActiveRecord/Ba...

As of Rails 2.2.2, how do I protect all attributes of my model?


Best regards,
This topic is locked and can not be replied to.