I’m having a problem mapping relations between classes representing
different roles.
For instance, let’s assume a social network. A user can relate to other
users thought a friendship relation. So I would like to have a table
names friends that would have user1_id and user2_id and some more
attributes. Rails would requires something like a many to many relation
with a table users_users with two columns: user_id and user_id. Of
course this doesn’t make sense. I know how to hack this but I would like
to know what’s “the ruby way” for this, using simple active records
relations.
Thanks