Agile Web Development with Rails 6: LineItem

In theory if the join table doesn’t do more than just connect two tables, you are right, you probably would not need to create a model class for it. Iteration D2 doesn’t really foreshadow this, but in Iteration E1, we add a quantity to the line item, and this is a good example of why you’d make a model for the join table - to add metadata about the many-to-many relationship itself.

1 Like