DEV Community

Discussion on: Everything There Is to Know About Associations in Rails

Collapse
 
thorstenhirsch profile image
Thorsten Hirsch

I think the habtm table should be called 'users_roles' (note the plural for both models) instead of 'user_roles'. See stackoverflow.com/questions/656133....

Collapse
 
neshaz profile image
Nesha Zoric

Thank you for noticing! You were right, the correct naming convention in habtm is to use plural for the associated models.