title: How to get devise to work with accepts_nested_attributes_for in a has one relationship?
body: <p>I am trying to get my user form to also allow the user to fill out their company profile at the same time via form_for. For some reason it is not showing the company fields. Here is my code for the controller and layouts.</p>
  
  <pre><code>class User &lt; ActiveRecord::Base
    attr_accessible :company_attributes
  
    has_one :company
    accepts_nested_attributes_for :company
  end
  
  class Company &lt; ActiveRecord::Base
    belongs_to :user
  
    # Validation
    validates :name, :presence =&gt; true
  end
  
  &lt;%= f.fields_for :company do |company_form| %&gt;
    &lt;div class="field"&gt;
      &lt;%= company_form.label :name, "Company Name" %&gt;&lt;br /&gt;
      &lt;%= company_form.text_field :name %&gt;
    &lt;/div&gt;
  &lt;% end %&gt;
  </code></pre>