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.
class User < ActiveRecord::Base
attr_accessible :company_attributes
has_one :company
accepts_nested_attributes_for :company
end
class Company < ActiveRecord::Base
belongs_to :user
# Validation
validates :name, :presence => true
end
<%= f.fields_for :company do |company_form| %>
<div class="field">
<%= company_form.label :name, "Company Name" %><br />
<%= company_form.text_field :name %>
</div>
<% end %>