Paul, You probably want to have some has_many :through style association, i.e. User has many Roles through ProjectPosition, or something like that.
- james On 4/20/06, Paul Robinson <[EMAIL PROTECTED]> wrote: > OK, I've not seen anything out there on this, but maybe you guys can > make a suggestion. > > I have Users, and they of course have Roles. However, the Roles they > have are not global, they are only in place for certain Projects. > There are some Roles that are generic - e.g. a 'General User' role > applies to all Users, irrespective of Project > > So, a user might be a 'Manager' for one project and a 'Designer' on > another project. > > I need to be able to simply manage this process and over-ride stuff > in lib like link_if_authorized. > > I have spent two days writing code, it's an absolute mess, and I > think it's because I'm not thinking clearly about how to handle what > is in effect a 3-way HABTM relationship: Projects HABTM Users, Users > HABTM Roles, Roles HABTM Projects. > > As a result, I'm not going to paste any code here - just curious if > anybody has any ideas about how they would approach this to help me > clear my head. > > -- > Paul Robinson > > > _______________________________________________ > engine-users mailing list > [email protected] > http://lists.rails-engines.org/listinfo.cgi/engine-users-rails-engines.org > -- * J * ~ _______________________________________________ engine-users mailing list [email protected] http://lists.rails-engines.org/listinfo.cgi/engine-users-rails-engines.org
