Two fields associated to the same table

you need 2 foriegn keys. Then add the :foriegn_key => :user2_id to has_many and belongs_to