search for: contacts_attributes

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

2009 Sep 21
0
Polymorphic form
...ts 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 I view source on the new user page, the type value is ap...