Displaying 1 result from an estimated 1 matches for "validate_exclus".
2007 Sep 07
5
enforce mutual exclusivity
...ctiveRecord 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
something
like validate_exclusive but that doesn''t appear to exist. Can anyone
suggest how I can implement this. Otherwise, is there a better
pattern
I could use to model this?
Many thanks,
Toby.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google...