We've moved discussions to Discord

Adding Devise Models[SOLVED]

Rob Thomas
Hey Guys, 

Is there anything special that I have to do to add other Devise models to the Jumpstart template. Let's say I want to add:

rails generate devise seller

Rob
 
Chris Oliver
Hey Rob,

I would advise against that and instead add roles to the User model. It's much easier to work with a single User model than having multiple.
Rob Thomas
Cool beans, I just wanted to make sure, thanks Chris Oliver  ! 
Dan Weaver
Chris Oliver In my app we have 4 user types. In the previous build I used a single User model with Single Table Inheritance for the various user types. We have Owner, Staff, Teacher and Family.

Unfortunately we didn't really account for a teacher also being a family, or staff, etc.

Do you think roles would be a better way to do this?
Chris Oliver
Definitely think Roles would work great there. In almost all cases it's a better method.

The only time I'd maybe have separate models is when you really want to lock down the admin area over and above. If you have an AdminUser model separate from User, then there's complete separation between the admin and the main app and no associations or anything are on the AdminUser model. 

There may be other situations where you'd want full separation between user types, but in most cases the flexibility of having one User model with the ability to share roles down the road as the product evolves makes for WAY easier development.
Notifications
You’re not receiving notifications from this thread.