title: Can't get plain old many-to-one nested form to save
body: <p>I'm on Rails 3. I have a model <code>Client</code> that has an <code>address_id</code>. In my <code>Client</code> form, I have nested <code>Address</code> fields. Here's that the <code>Address</code> part of the form:</p>
  
  <pre><code>  &lt;%= f.fields_for @client.address do |address_form| %&gt;
      &lt;div class="field"&gt;
        &lt;%= address_form.label :line1 %&gt;&lt;br /&gt;
        &lt;%= address_form.text_field :line1 %&gt;
      &lt;/div&gt;
      &lt;div class="field"&gt;
        &lt;%= address_form.label :line2 %&gt;&lt;br /&gt;
        &lt;%= address_form.text_field :line2 %&gt;
      &lt;/div&gt;
      &lt;div class="field"&gt;
        &lt;%= address_form.label :city %&gt;&lt;br /&gt;
        &lt;%= address_form.text_field :city %&gt;
      &lt;/div&gt;
      &lt;div class="field"&gt;
        &lt;%= address_form.label :state_id %&gt;&lt;br /&gt;
        &lt;%= select("client[address]", "state_id", State.all.collect {|s| [ s.name, s.id ] }) %&gt;
      &lt;/div&gt;
      &lt;div class="field"&gt;
        &lt;%= address_form.label :zip %&gt;&lt;br /&gt;
        &lt;%= address_form.text_field :zip %&gt;
      &lt;/div&gt;
    &lt;% end %&gt;
  </code></pre>
  
  <p>When I try to save my form, I get this:</p>
  
  <pre><code>Address(#23652762896420) expected, got ActiveSupport::HashWithIndifferentAccess(#23652751466220)
  </code></pre>
  
  <p>I don't understand exactly what that means or why I'm getting it. Here's what <code>params.inspect</code> looks like:</p>
  
  <pre><code>{"commit"=&gt;"Update Client",
   "authenticity_token"=&gt;"CBw1fQcsUtXs9x6lKTL4zeoekX1cwuFUrZvZpCShHIc=",
   "_method"=&gt;"put",
   "utf8"=&gt;"\342\234\223",
   "action"=&gt;"update",
   "id"=&gt;"16",
   "client"=&gt;{"name"=&gt;"Rosie O'Donnell",
              "address"=&gt;{"city"=&gt;"Grand Rapids",
                          "line1"=&gt;"216 Grandville Ave SW",
                          "zip"=&gt;"49503",
                          "line2"=&gt;"",
                          "state_id"=&gt;"1"},
              "phone"=&gt;"",
              "salon_id"=&gt;"1",
              "email"=&gt;""},
   "controller"=&gt;"clients"}
  </code></pre>
  
  <p>Can someone please tell me what's going on?</p>