I am currently thinking about how to do the following:
I have the following models.
Team has various positions (manager, programmer etc.) I would like each
one of those positions to reference one or more Person records. A single
Person record could be on 6 different teams at the same time in
different roles. the same person could even be on the same team multiple
times in different roles.
I am not 100% sure how to go about this. I am thinking that I will need
something like an intermediate record.
I would then have (I think) to have methods in the Team model that will
find each person in the @team.people array based on the role.
I the end I want a view to have something like:
Manager: Person1, Person 4
Programmer: Person2, Person 3
With just a single find that :includes all the relevant people.
I apologise if this isn’t very clear. The joys of not being a Ruby
programmer but a Ruby dabbler