I have an app where “users” can belong in “groups” with certain “roles”
(eg. a user can own a group).
Normally I’d make users has_and_belongs_to_many groups and put a role_id
on the join table. But - a role is really a first class citizen also, so
a model is in order.
The problem with making a “role” model which has_many “users” and
“groups”, is that it blurs the user/group relation which is also a first
A concrete need is, that I need to be able to look up “items” which have
been assigned to a “user”, or a “group” in which the user has the role
How can I support this need and have a “role” model also?