search for: has_and_belongsto_mani

Displaying 1 result from an estimated 1 matches for "has_and_belongsto_mani".

Did you mean: has_and_belongsto_many
2007 Sep 07
5
enforce mutual exclusivity
Hi, First post, please be gentle! I couldn''t find any mention of this already I''m using ActiveRecord and I want to enforce mutual exclusivity on a has_and_belongs_to_many. A concrete example: I have a User which can have one or more Roles (student, tutor, headmaster, administrator etc). However if a user is a student they cannot hold any other role. I was hoping to find