Skip to content

Instantly share code, notes, and snippets.

@Sporky023
Created August 11, 2011 20:48
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 Sporky023/1140723 to your computer and use it in GitHub Desktop.
Save Sporky023/1140723 to your computer and use it in GitHub Desktop.
class Tagging < ActiveRecord::Base
belongs_to :tag
belongs_to :post
validates :tag, :uniqueness => {:scope => :post}
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment