title: Can't mass-assign protected attributes
body: <p>Updating the code formatting for better viewing.</p>
  
  <p>Folks,</p>
  
  <p>I have been looking at this for sometime but I don't understand what could be messing up here. I am using Devise.</p>
  
  <pre><code>class User &lt; ActiveRecord::Base
    has_many :addresses
    accepts_nested_attributes_for :addresses
  
    # Other stuff here
  end
  
  class Address &lt; ActiveRecord::Base
  
    belongs_to :user
  
    validates_presence_of :zip #:street_address1, 
  </code></pre>
  
  <p>end</p>
  
  <blockquote>
    <p>-------------------- log output begin ------------------------------</p>
    
    <p>Started POST "/users" for 127.0.0.1 at
    2011-05-28 11:43:27 -0700   Processing
    by RegistrationsController#create as
    HTML   Parameters: {"utf8"=>"√",
    "authenticity_token"=>"CEmdqlsmdYa6Jq0iIf5KAxxISsUCREIrFNXWkP80nhk=",
    "user"=>{"email"=>"a2@gmail.com",
    "password"=>"[FILT ERED]",
    "addresses_attributes"=>{"0"=>{"street_address1"=>"234
    Pitkin Ct.", "zip"=>"12456"}}},
    "commit"=>"Sign up"} WARNING: Can't
    mass-assign protected attributes:
    addresses_attributes   SQL (0.0ms) 
    BEGIN   SQL (164.0ms)  SHOW TABLES<br>
    User Load (0.0ms)  SELECT <code>users</code>.<code>id</code>
    FROM <code>users</code> WHERE (<code>users</code>.<code>email</code> =
    BINARY 'a2@gmail.com') LIMIT 1   SQL
    (1.0ms)  ROLLBACK</p>
    
    <p>-------------------- log output end ------------------------------</p>
  </blockquote>
  
  <p>The zip is present in the data posted and the posted data seems to be formatted properly. On the web page form I am getting the error that "Addresses zip can't be blank". I have dug around for what causes the "Can't mass-assign protected attributes" warning but haven't found anything that will help me.</p>
  
  <p>Thanks for your thoughts and pointers.</p>
  
  <p>-S </p>