I could not articulate the words (in the title of the question), which I am trying to do, therefore, in honor of saying that an image is worth a thousand words; In short, what I'm trying to do is ...

Basically, I have a Teacher has many Assignments and a Student has many Assignments , which roughly corresponds to:

I try to avoid using the has_and_belongs_to_many macro, because my meeting model has some value (operation), for example, it has a logical field: confirmed.
So, I was thinking about using the has_many macro : through and maybe using the Assignable table model? What do you guys think?
The script I'm trying to execute is simple,
- Student requests meeting with teacher on specific dates / times
- If Teacher is available (and wants to give a lesson at this date / time), she confirms the appointment.
I hope you tell me how you would approach this problem? Is my assumption about using has_many: through a macro correct?
Thanks!
jlstr source share