Class: Tagging
The Tagging join model. This model is automatically generated and added to your app if you run the tagging generator included with has_many_polymorphs.
Public Instance Methods
after_destroy ()
This callback makes sure that an orphaned Tag is deleted if it no longer tags anything.
# File generators/tagging/templates/tagging.rb, line 13 13: def after_destroy 14: <%= parent_association_name -%>.destroy_without_callbacks if <%= parent_association_name -%> and <%= parent_association_name -%>.taggings.count == 0 15: end