Sha256: a5cf32463a9fd33cf48d959134051057231fd3ec68ebc055daefc6cdf84a630f

Contents?: true

Size: 238 Bytes

Versions: 11

Compression:

Stored size: 238 Bytes

Contents

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

Version data entries

11 entries across 11 versions & 7 rubygems

Version Path
elight-acts_as_taggable_on_steroids-1.1 lib/tagging.rb
ggoodale-acts_as_taggable_on_steroids-1.1.1 lib/tagging.rb
ggoodale-acts_as_taggable_on_steroids-1.1 lib/tagging.rb
jviney-acts_as_taggable_on_steroids-1.0 lib/tagging.rb
jviney-acts_as_taggable_on_steroids-1.1 lib/tagging.rb
rotuka-taggable-0.0.1 generators/tags/templates/tagging.rb
seamusabshere-acts_as_taggable_on_steroids-1.0 lib/tagging.rb
seamusabshere-acts_as_taggable_on_steroids-1.3 examples/tagging.rb
acts_as_taggable_on_steroids-1.2 lib/tagging.rb
acts_as_taggable_on_steroids-1.1 lib/tagging.rb
pictrails-0.5.0 vendor/plugins/acts_as_taggable_on_steroids/lib/tagging.rb