--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Similar to the attr_protected macro, this protects attributes of your model from mass-assignment, such as <tt>new(attributes)</tt> and <tt>attributes=(attributes)</tt> however, it does it in the opposite way. This locks all attributes and only allows access to the attributes specified. Assignment to attributes not in this list will be ignored and need to be set using the direct writer methods instead. This is meant to protect sensitive attributes from being overwritten by URL/form hackers. If you'd rather start from an all-open default and restrict attributes as needed, have a look at attr_protected.
- !ruby/struct:SM::Flow::H 
  level: 4
  text: Options
- !ruby/struct:SM::Flow::P 
  body: <tt>*attributes</tt> A comma separated list of symbols that represent columns <em>not</em> to be protected
- !ruby/struct:SM::Flow::H 
  level: 4
  text: Examples
- !ruby/struct:SM::Flow::VERB 
  body: "  class Customer &lt; ActiveRecord::Base\n    attr_accessible :name, :nickname\n  end\n\n  customer = Customer.new(:name =&gt; &quot;David&quot;, :nickname =&gt; &quot;Dave&quot;, :credit_rating =&gt; &quot;Excellent&quot;)\n  customer.credit_rating # =&gt; nil\n  customer.attributes = { :name =&gt; &quot;Jolly fellow&quot;, :credit_rating =&gt; &quot;Superb&quot; }\n  customer.credit_rating # =&gt; nil\n\n  customer.credit_rating = &quot;Average&quot;\n  customer.credit_rating # =&gt; &quot;Average&quot;\n"
full_name: ActiveRecord::Base::attr_accessible
is_singleton: true
name: attr_accessible
params: (*attributes)
visibility: public
