Sha256: 805de1637f982f19e3488c1b662b557a0925d4ca4ad8cbf084cb6f358c7483cb

Contents?: true

Size: 381 Bytes

Versions: 6

Compression:

Stored size: 381 Bytes

Contents

class Gutentag::Tagging < ActiveRecord::Base
  self.table_name = 'gutentag_taggings'

  belongs_to :taggable, :polymorphic => true
  belongs_to :tag, :class_name => 'Gutentag::Tag', :counter_cache => true

  validates :taggable, :presence => true
  validates :tag,      :presence => true
  validates :tag_id,   :uniqueness => {
    :scope => [:taggable_id, :taggable_type]
  }
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
gutentag-0.9.0 app/models/gutentag/tagging.rb
gutentag-0.8.0 app/models/gutentag/tagging.rb
gutentag-0.7.0 app/models/gutentag/tagging.rb
gutentag-0.6.0 app/models/gutentag/tagging.rb
gutentag-0.5.1 app/models/gutentag/tagging.rb
gutentag-0.5.0 app/models/gutentag/tagging.rb