JamesBarnsley
(Jamesbarnsleyfreelance)
January 20, 2015, 4:10pm
1
Hi,
I have a User model and a User form which I use for creating / updating users.
When a User has logged into the system the User also gets his own update profile page which he can use to edit his details.
The update profile page will contain more form fields than the standard create / update user forms.
Do you think I should extend the User model and override the "rules"?
Or do you think I should use scenarios?
If you display more fields than those in the User model, I think you’ll need to save them, or not?
If so, you can create a subclass of User and call it UserComplete, for example, although I do not understand what is the use of the base class, at this point.
Hi James,
if you want to use same User model, you can use scenarios.
anyway, I am using another model like profile, and user can change it.
many thanks
JamesBarnsley
(Jamesbarnsleyfreelance)
January 21, 2015, 10:06am
4
Yes I am just wondering which is best.
Create / update user = User Model.
Update user profile = User Model but with more fields to display on form.
Would scenarios or extending User Model be the best choice?