# Different kinds of Users (roles) should I use inheritance?

**URL:** <https://www.ruby-forum.com/t/different-kinds-of-users-roles-should-i-use-inheritance/128978>\
**Category:** Rails\
**Created:** [February 13, 2008, 7:10am UTC](https://www.ruby-forum.com/t/different-kinds-of-users-roles-should-i-use-inheritance/128978 "2008-02-13T07:10:48Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![jhnsntmthy](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/d07c76/32.png) [@jhnsntmthy](https://www.ruby-forum.com/u/jhnsntmthy)\
**Post date:** [February 13, 2008, 7:10am UTC](https://www.ruby-forum.com/t/different-kinds-of-users-roles-should-i-use-inheritance/128978/1 "2008-02-13T07:10:48Z")

</div>

Hi, in my application I have 3 different kinds of Users

Patients  
Therapists  
Admins

For the sake of it, Admins are not important here, what is important is  
that a Patient belongs\_to a Therapist, and likewise a Therapist has\_many  
Patients. Good enough so far

I am using restful\_authentication FWIW, and have a User model that  
people can use to signup and sign in to the application. I have in the  
past just used a “role” field to differentiate what people can see, etc.  
But I am stuck trying to figure out how to get the relationship between  
Therapists and Patients working together. Do I subclass User into 2  
models, and then create a join table? Or is there an easier solution?

Thanks for any guidance,  
Cheers,  
Timothy J.  
(w) [www.foundinteractive.com](http://www.foundinteractive.com)
