I’m having some difficulty deciding where to put logic that crosses
For example, given models people, departments, work schedules, and
Where would the following best fit:
who is scheduled to work in a given department in a given week?
how many hours is a given person scheduled in a given week?
how many hours is a given person scheduled in a department in given
how many hours total are scheduled in a week?
The first three could possibly go in department or person, but doesn’t
feel exactly right. Especially because I have a lot of these type
problems and filling Person with methods like
num_hours_scheduled_by_department_and_week( department, week ) seems
The last doesn’t seem to fit in any existing model.
I guess the question boils down to where do you represent data that is
the intersection or composite of multiple models?