Skip to content

Instantly share code, notes, and snippets.

@Sporky023
Created August 11, 2011 20:48
Show Gist options
  • 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