Class: Tagging

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

Overview

The Tagging join model.

Instance Method Summary (collapse)

Instance Method Details

- (Object) delete_orphaned_tag (private)



13
14
15
# File 'app/models/tagging.rb', line 13

def delete_orphaned_tag
  tag.destroy if tag and tag.taggings.count == 0
end