Skip to content

Instantly share code, notes, and snippets.

@gotjosh
Created March 9, 2012 21:19
Show Gist options
  • Select an option

  • Save gotjosh/2008754 to your computer and use it in GitHub Desktop.

Select an option

Save gotjosh/2008754 to your computer and use it in GitHub Desktop.
- Source
-- has_many :videos
-- belongs_to :publisher
- Publisher
-- has_many :sources
- Video
-- has_and_belongs_to_many :tags
-- belongs_to source
- Tags
-- has_and_belongs_to_many :videos
Now my problem is that my tags are publisher specific, meaning that i should be able to get the tags that belong to each publisher, on a regular basis during my app. Do you guys think I should make a direct relation to the tag model? with a belongs_to :publisher?
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment