Creating multiple relationships in rails with same datatypes

Posted by Lowgain on Stack Overflow See other posts from Stack Overflow or by Lowgain
Published on 2010-03-29T19:45:20Z Indexed on 2010/03/29 20:03 UTC
Read the original article Hit count: 619

Filed under:
|
|

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?

© Stack Overflow or respective owner

Related posts about ruby-on-rails

Related posts about database