has_and_belongs_to_many

The join table must have only two foreign keys, otherwise use has_many :through instead of.

rails g migration CreateJoinTableCustomerProduct customer product

Reference

results matching ""

    No results matching ""