How do you model many-to-many relationships in Rails? Compare `has_many :through` and `has_and_belongs_to_many`.

Topic: rails, ActiveRecord. Level: Basic.

The full answer to this question is available to Interview Reader members. See what is free and what Premium adds.