Timothy Johnson
2008-Feb-13 06:10 UTC
Different kinds of Users (roles) should I use inheritance?
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 Johnson (w) www.foundinteractive.com -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---