Code Editor
Terminal
Web Browser
Learn

What did we just do? Check out the diagram in the browser:

  1. We created three models - Movie, Actor, and Part.
  2. In the models, we used the has_many :through association to connect the Movie model to the Actor model through the Part model.

In this way, the has_many :through association sets up a many-to-many relationship between movies and actors.

Report a Bug
If you see a bug or any other issue with this page, please report it here.