Sha256: 83dbe7b1ba55fbe43decad85ca1a4207a3be15a4b72e62b01a679ba84ec86c01

Contents?: true

Size: 205 Bytes

Versions: 15

Compression:

Stored size: 205 Bytes

Contents

class Tagging < ActiveRecord::Base #:nodoc:
  belongs_to :tag
  belongs_to :taggable, :polymorphic => true
  
  after_destroy do
    tag.destroy if Tag.destroy_unused && tag.taggings.count.zero?
  end
end

Version data entries

15 entries across 15 versions & 2 rubygems

Version Path
adva-0.3.2 vendor/gems/simple_taggable/lib/tagging.rb
adva-0.3.1 vendor/gems/simple_taggable/lib/tagging.rb
adva-0.3.0 vendor/gems/simple_taggable/lib/tagging.rb
adva-0.2.4 vendor/gems/simple_taggable/lib/tagging.rb
adva-0.2.3 vendor/gems/simple_taggable/lib/tagging.rb
adva-0.2.2 vendor/gems/simple_taggable/lib/tagging.rb
adva-0.2.1 vendor/gems/simple_taggable/lib/tagging.rb
adva-0.2.0 vendor/gems/simple_taggable/lib/tagging.rb
adva-0.1.4 vendor/gems/simple_taggable/lib/tagging.rb
adva-0.1.3 vendor/gems/simple_taggable/lib/tagging.rb
adva-0.1.2 vendor/gems/simple_taggable/lib/tagging.rb
adva-0.1.1 vendor/gems/simple_taggable/lib/tagging.rb
adva-0.1.0 vendor/gems/simple_taggable/lib/tagging.rb
adva_cms-0.0.1 vendor/gems/simple_taggable/lib/tagging.rb
adva-0.0.1 adva_cms/vendor/gems/simple_taggable/lib/tagging.rb