Sha256: 2ab9de86c2d4097002e1f0bd2dae02a3c42beaa321f1fabdf1bea7402ea73f0c

Contents?: true

Size: 413 Bytes

Versions: 19

Compression:

Stored size: 413 Bytes

Contents

# frozen_string_literal: true

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 => %i[ taggable_id taggable_type ]
  }
end

Version data entries

19 entries across 19 versions & 1 rubygems

Version Path
gutentag-2.6.2 app/models/gutentag/tagging.rb
gutentag-2.6.1 app/models/gutentag/tagging.rb
gutentag-2.6.0 app/models/gutentag/tagging.rb
gutentag-2.5.4 app/models/gutentag/tagging.rb
gutentag-2.5.3 app/models/gutentag/tagging.rb
gutentag-2.5.2 app/models/gutentag/tagging.rb
gutentag-2.5.1 app/models/gutentag/tagging.rb
gutentag-2.5.0 app/models/gutentag/tagging.rb
gutentag-2.4.1 app/models/gutentag/tagging.rb
gutentag-2.4.0 app/models/gutentag/tagging.rb
gutentag-2.3.2 app/models/gutentag/tagging.rb
gutentag-2.3.1 app/models/gutentag/tagging.rb
gutentag-2.3.0 app/models/gutentag/tagging.rb
gutentag-2.2.1 app/models/gutentag/tagging.rb
gutentag-2.2.0 app/models/gutentag/tagging.rb
gutentag-2.1.0 app/models/gutentag/tagging.rb
gutentag-2.0.0 app/models/gutentag/tagging.rb
gutentag-1.1.0 app/models/gutentag/tagging.rb
gutentag-1.0.0 app/models/gutentag/tagging.rb