If you are attempting to implement tagging functionality on your
documents then you should try to use acts_as_taggable gem or
acts_as_taggable plugin. (I used gem in my use case, because it was more
Chances are that you want to users to be able to tag documents? if thats
the case then using acts_as_taggable gem will make your life easy. get
back to me, if that is the case I can guide you further.
----- Original Message ----
From: vanesam [email protected]
To: [email protected]
Sent: Saturday, April 1, 2006 1:29:53 AM
Subject: [Rails] Triple relationship
I need to represent a relationship between three tables:
Tags (id, name)
Users (id, name, email, … )
Documents (id, title, … )
I created a forth table called Assignments(id, tag-id, user-id,
I have couple of questions:
Should I use belongs-to and has-many to capture this? If so, How can I
should I have the id as the primary key in Assignment table or not?
Any help is most appreciated.