Hi,
I have two user models - PrivateUser and CorporateUser - in my Rails
1.2 application. Both are subclasses of User, created by
restful_authentication, which defines a user which can log in to my
application.
Now, I want to let both types of users register. They will need
different forms to fill out, but the logic is similar. So the use case
is
- User clicks Register link
- User chooses account type
- User fills out form
- User clicks Register to submit form
In the rest of the application, the two types of users are not very
similar - they have different roles and should get different views,
actions etc.
I am looking for the best way to keep my registration DRY - is there
something smart I can do here, or should I just make two completely
separate controllers whose code for ‘new’ just happen to be very
similar?