I have a complex active record relationship in mind, and was wondering how exactly I would accomplish it. In essence:
A User can create a Board. A user can then add other users to that board for collaborative editing. Added users form a Team. Each added User has a Role in each board, (Admin, Editor, Viewer).
I was thinking of setting it up this way:
A User has many Boards
A Board has many Users through Teams
A Team has many Users?
The role part has been confusing me. Do I have to set up a TeamUser model which has many Roles, or does each User have many Roles which belong to a Board? Does a Role even have to be it's own model?
What is the most effective way to accomplish my goal?