Rails 4 multiple form (User and Address) <p>I have problem with creating multiple form for User and Address models. When I load page, I don't see address fields.</p> <p>Me source code is below</p> <p>models/address</p> <pre><code>class Address &lt; ActiveRecord::Base has_one :user end </code></pre> <p>models/user</p> <pre><code>class User &lt; ActiveRecord::Base belongs_to :address accepts_nested_attributes_for :address end </code></pre> <p>controllers/users_controller</p> <pre><code>class UsersController &lt; ApplicationController before_filter :require_user, :only =&gt; [:show, :edit, :update] def new @user = User.new @user.build_address end private def user_params params.require(:user).permit( :first_name, :last_name, :email, :password, :password_confirmation, addresses_attributes: [:id, :city] ) end end </code></pre> <p>views/users/new.html.erb</p> <pre><code>&lt;%= form_for @user do |form| %&gt; ... &lt;% form.fields_for :address do |builder| %&gt; &lt;p&gt; &lt;%= builder.label :city %&gt;&lt;br /&gt; &lt;%= builder.text_field :city %&gt; &lt;/p&gt; &lt;% end %&gt; &lt;%= form.submit "Register" %&gt; &lt;% end %&gt; </code></pre> <p>Thank you.</p>