So here is the scenario:
User:
has_one :company
accepts_nested_attributes_for :company
Controller:
@user = User.new
@user.build_company
View:
<% semantic_form_for @user, :url => register_path do |form| %>
<h2>User Information</h2>
<%= form.inputs %>
<h2>Company Information</h2>
<% form.semantic_fields_for :company do |company| %>
<%= company.inputs %>
<% end %>
<%= form.buttons %>
<% end %>
After cleaning the web pages, this is SEEMS, as it should work. However, all I get is user inputs. The semantic_fields_for: company block does not display anything ...
Am I missing something, or is it possibly a Rails 3 error with Formtastic?
source
share