Hi, I have a Friend model that looks like this:
create_table “friendships”, :force => true do |t|
t.column “sent_by_user_id”, :integer
t.column “received_by_user_id”, :integer
t.column “status”, :boolean
I would like to be able to define a :friends association in my user
model that returns friendships that are both sent_by and received_by a
given user. Any way to do this?
I’ve been told that traditionally you just create two friendship
records to handle this, but it seems like a cumbersome solution.