Class: Tagging

Inherits:
ApplicationRecord show all
Defined in:
app/models/tagging.rb

Overview

The Tagging join model.

Instance Method Summary collapse

Instance Method Details

#delete_orphaned_tagObject (private)



10
11
12
# File 'app/models/tagging.rb', line 10

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