If you name this table roles_users then Rails will know how to join them automatically. It uses the table names, sorted alphabetically, joined by an underscore.