When I submit the form it creates the new Outfitter, but it does not create a new User. In the log it says 'Unpermitted parameters: utf8, authenticity_token, first_name, last_name, email, password, password_confirmation, commit'
Modal html:(modal is in application.html.erb. Page is localhost:3000/pages/index)
<div id="popup-outfitter-signup" class="modal popup">
<div class="modal-main rounded-10px">
<div class="modal-title">
Create your Outfitter<br/>
</div><!-- end .modal-title -->
<%= simple_form_for :outfitter do |f| %>
<div class="modal-message">
<p>
<%= label_tag :name, "Outfitter Name" %><br/>
<%= text_field_tag :name, params[:name], class: 'input-txt rounded-2px' %>
</p>
<p>
<%= label_tag :address, "Address:" %><br/>
<%= text_field_tag :address, params[:address], class: 'input-txt rounded-2px' %>
</p>
<p>
<%= label_tag :business_phone, "Phone:" %><br/>
<%= text_field_tag :business_phone, params[:business_phone], class: 'input-txt rounded-2px' %>
</p>
<%= simple_fields_for :users do %>
<p>
<%= label_tag :first_name, "First Name" %><br/>
<%= text_field_tag :first_name, params[:first_name], class: 'input-txt rounded-2px' %>
</p>
<p>
<%= label_tag :last_name, "Last Name:" %><br/>
<%= text_field_tag :last_name, params[:last_name], class: 'input-txt rounded-2px' %>
</p>
<p>
<%= label_tag :email, "Email:" %><br/>
<%= text_field_tag :email, params[:email], class: 'input-txt rounded-2px' %>
</p>
<p>
<%= label_tag :password, "Password:" %><br/>
<%= password_field_tag :password, params[:password], class: 'input-txt rounded-2px' %>
</p>
<p>
<%= label_tag :password_confirmation, "Password Confirmation:" %><br/>
<%= password_field_tag :password_confirmation, params[:password_confirmation], class: 'input-txt rounded-2px' %>
</p>
<% end %>
<div class="button rounded-2px trans-all">
<%= submit_tag "Signup", class: 'send-btn rounded-2px trans-all' %>
</div>
<br/>
</div>
<% end %>
</div><!-- end .modal-main -->
</div><!-- end .modal -->
outfitters_controller.rb
def new
@outfitter = Outfitter.new
@outfitter.users.build
end
See Question&Answers more detail:os