search for: build_person

Displaying 1 result from an estimated 1 matches for "build_person".

2009 Sep 21
0
Polymorphic form
...<% end -%> </div> Everything else gets saved just fine, but it complains on validation about the lack of a type field: - Person contacts type can''t be blank I have it saving like so, in users_controller.rb def create @user = User.new(params[:user]) @person = @user.build_person(params[:user][:person]) @person.contacts_attributes = params[:person][:contacts] if @user.save flash[:notice] = ''User was successfully registered.'' redirect_back_or_default account_url else render :action => :new end end Note also that when...