title: Can't mass-assign protected attributes: user
body: <p>I'm working on a simple app that requires me to submit a form. I created two models.</p>
  
  <p><strong>user.rb</strong></p>
  
  <pre><code>class User &lt; ActiveRecord::Base
    attr_accessible :email
  
    has_many :item
  end
  </code></pre>
  
  <p><strong>item.rb</strong></p>
  
  <pre><code>class Item &lt; ActiveRecord::Base
    attr_accessible :user_id
  
    belongs_to :user
  end
  </code></pre>
  
  <p>Instead of creating a user using the <strong>user form view</strong>, I'm trying to create the user using the <strong>item form view</strong>.</p>
  
  <p><strong>items/_form.html.haml</strong></p>
  
  <pre><code>= nested_form_for @item do |form|
  
    = form.fields_for :user do |builder|
      = builder.text_field :email
  
    = form.submit "Save"
  </code></pre>
  
  <p>Did I miss something here? I'm using nested_form_for btw. Thank you.</p>