Class: Tagging
- Inherits:
-
ActiveRecord::Base
- Object
- ActiveRecord::Base
- Tagging
- Defined in:
- app/models/tagging.rb
Instance Method Summary collapse
-
#before_destroy ⇒ Object
good housekeeping idea from tags extension.
Instance Method Details
#before_destroy ⇒ Object
good housekeeping idea from tags extension. if all the taggings for a particular tag are deleted, we want to delete the tag too
46 47 48 |
# File 'app/models/tagging.rb', line 46 def before_destroy tag.destroy_without_callbacks if Tagging.with(tag).count < 1 end |