开发者

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜