Class: Tagging

Inherits:
ActiveRecord::Base
  • Object
show all
Defined in:
lib/tagging.rb

Overview

:nodoc:

Instance Method Summary collapse

Instance Method Details

#after_destroyObject



5
6
7
8
9
10
11
# File 'lib/tagging.rb', line 5

def after_destroy
  if Tag.destroy_unused
    if tag.taggings.count.zero?
      tag.destroy
    end
  end
end