Closed payne-chris-r closed 7 years ago
That looks like an accurate example to me.
With that set up, the Doctor
will have many appointments
and many patients
through those appointments
which is the many to many
relationship to Patients
.
The Doctor
will also have many primary_care_recipients
which is the one to many
relationship to Patients
.
Closing per explanation added to README https://github.com/ga-wdi-boston/rails-api-many-to-many/commit/34df18dfeccf19f1781783cd1765d04682009dbe
Warning, recent changes in both rails 4 and rails 5 have made previous best practices regarding
inverse_of
potentially obsolete (thought they're still perfectly safe to set as long as you don't misspell anything!)Finn: As an example, the relationships in the above article
@channel :point_up: does this mean we should be doing the following:
???