How to allow user to set a profile attribute when signing up?
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. 开发者_如何学GoCan I do this? If so, how?
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_name
instead of profile.full_name
.
精彩评论