Skip to content

Instantly share code, notes, and snippets.

@pjammer
Forked from seivan/snippet.rb
Created February 11, 2010 00:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pjammer/301035 to your computer and use it in GitHub Desktop.
Save pjammer/301035 to your computer and use it in GitHub Desktop.
class Post
has_many :comments
has_many :tags, :as => :taggable
class Comment
belongs_to :post
has_many :tags, :as => :taggable
class Tag
belongs_to :taggable, :polymorphic => true
#not needed
#class Tagging
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment