My Profile model has a full_name attribute, but I want it to be set when the user signs up by the User create method. The profile and user are two separate models with two separate controllers. Can I do this? If so, how?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Wouldn’t it make more sense to have full_name on User? Then each Profile will have a User and the Profile can just delegate the full_name accessor to its User; or the view could just use
profile.user.full_nameinstead ofprofile.full_name.