I have a user model that can "follow" some tags
User
has_many :tag_followings
has_many :tags, :through => :tag_followings
Then I have some articles that have also some tags attached.
Article
has_many :tag_attachings
has_many :tags, :through => :tag_attachings
tag_attaching is a join table that has fields of: user_id and tag_id and tag_following is a join table that has fields of: article_id and tag_id
- I'm using Rich Many to Many relations(join table have an id)
I'm trying to find an efficient way to find articles that have tags that the user is following.
Best practices?