Jean ha scritto:
Thanks Tomas. I tried this way, but then I get this error:
NoMethodError in UserInformationsController#new
undefined method `build' for nil:NilClass
yeah, sorry, for has_one relation the correct statement is:
def new
@user = User.find(params[:id])
@user_information = @user.build_user_information
end
--
You received this message because you are subscribed to the Google Groups "Ruby on
Rails: Talk" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit https://groups.google.com/groups/opt_out.