Natalie Tan25,519 Points
Poloymorphic Options in Rails
I was watching this video on polymorphic options https://teamtreehouse.com/library/polymorphic-options
I felt like the model used to demonstrate this concept was questionable.
Whilst both movies & shows can have many_actors through a "production", actors can also act in many movies & shows, and technically do not "belong_to" a production.
In reality, shouldn't that be a many to many relationship?
Tyler Maxwell41,534 Points
I see what you mean. The scenario they used is a bit confusing. The only way to have a many-to-many relationship is via a join table. A join table is basically just a table of foreign keys for each member of the relationship. If there is no join table, it can't be many-to-many. I hope that helps. Happy coding.