title: Form with nested attributes with a has_one association not working in Rails 3
body: <p>I'm tring to set values for two models that have a has_one association using accepts_nested_attributes_for, but nothing in the fields_for is being shown on the view.</p>
  
  <p>I have confirmed the same code works on Rails 2.x, and it works fine when its a has_many.
  Code below.</p>
  
  <p>Model</p>
  
  <pre><code>class Parent &lt; ActiveRecord::Base
  
    has_one :child
    accepts_nested_attributes_for :child
  end
  
  class Child &lt; ActiveRecord::Base
  
    belongs_to :parent
  end
  </code></pre>
  
  <p>Controller</p>
  
  <pre><code>def new
      @parent = Parent.new
      @parent.build_child
  end
  </code></pre>
  
  <p>View</p>
  
  <pre><code>&lt;%= form_for @parent do |f| %&gt;
    &lt;div class="field"&gt;
      &lt;%= f.label :name %&gt;&lt;br /&gt;
      &lt;%= f.text_field :name %&gt;
    &lt;/div&gt;
  
    &lt;% f.fields_for :child do |builder| %&gt;
  
      &lt;%= builder.label :childname %&gt;
      &lt;%= builder.text_field :childname %&gt;
    &lt;% end %&gt;
  
    &lt;div class="actions"&gt;
      &lt;%= f.submit %&gt;
    &lt;/div&gt;
  &lt;% end %&gt;
  </code></pre>
  
  <p>..And after copying that and looking at it, that's a horrible class name.</p>