Sha256: 70f95c7873f0a9e95884eafaf711798c760289a4133115cb67509ef495564575

Contents?: true

Size: 205 Bytes

Versions: 1

Compression:

Stored size: 205 Bytes

Contents

class Tagging < ActiveRecord::Base
  belongs_to :tag
  belongs_to :taggable, :polymorphic => true

  after_destroy do
    if Tag.destroy_unused && !tag.taggings.exists?
      tag.destroy
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
acts_as_20ggable-1.0.0 lib/tagging.rb