I have a standard many-to-many relationship between users and roles in my Rails app:
class User < ActiveRecord::Base has_many :user_roles has_many :ro
This will create only one association in the database even if called multiple times Refer rails guide.
user.roles=[Role.first]