A relationship model only makes sense for an N-to-N relationship, as you described it. When you decide to use has_and_belongs_to_many, you do not need to create a join model, but you still have to create a join table through migration. The naming convention is gadgets_users because the "g" is before the "u" in the alphabet.
If you selected has_many: through, you can save additional information in the connection table using the GadgetUser join model. For example, if you want to record that the gadget belonged to the user for a given time, then this information logically refers to the “connection” between the gadget and the user, so you should store it in the connection table.
moritz
source share