Creating multiple relationships in rails with same datatypes
- by Lowgain
What I am trying to do is kind of like this:
I have datatypes "user" and "article" for instance. I want to have relationships between these two, but in more than one way.
So for instance, I'd like to let a user "like" or "bookmark" an article. So I need to have two relations in the database, one for users liking the article, and one for users bookmarking, so making a "user_article" table for instance won't be sufficient, correct?
What is the best way of going about doing this?