What is the convention for naming a has_many through table/model if I have a model called events and one called users?
Is it events_users for the table? If so I get a problem with naming the Model, because rails doesn’t seem to like EventUser, nor does it seem to like EventsUser…
There are many ways to do this. Try naming your table
events_users. By default, the two involved tables in ahas_many throughor ahas_and_belongs_to_manyare pluralized and ordered alphabetically.You only need a model for the association if you plan on using it. If so, name it logically, and tell ActiveRecord the table name is
events_users.