Sha256: 8b18f711f9378cbef0e8a786e8f1d3c401bf4affeda841e055f02d8260974dbc

Contents?: true

Size: 465 Bytes

Versions: 2

Compression:

Stored size: 465 Bytes

Contents

class Tagging < ActiveRecord::Base #:nodoc:
  attr_accessible :tag, :tag_id, :context,
                  :taggable, :taggable_type, :taggable_id,
                  :tagger, :tagger_type, :tagger_id

  belongs_to :tag
  belongs_to :taggable, :polymorphic => true
  belongs_to :tagger, :polymorphic => true
  
  validates_presence_of :context
  validates_presence_of :tag_id
  
  validates_uniqueness_of :tag_id, :scope => [:taggable_type, :taggable_id, :context]
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
acts-as-taggable-on-1.0.19 lib/acts_as_taggable_on/tagging.rb
acts-as-taggable-on-1.0.18 lib/acts_as_taggable_on/tagging.rb