Class: Gutentag::RemoveUnused
- Inherits:
-
Object
- Object
- Gutentag::RemoveUnused
- Defined in:
- lib/gutentag/remove_unused.rb
Class Method Summary collapse
Class Method Details
.call ⇒ Object
4 5 6 7 8 9 |
# File 'lib/gutentag/remove_unused.rb', line 4 def self.call Gutentag::Tag.connection.execute "DELETE FROM gutentag_tags\nWHERE id NOT IN (SELECT DISTINCT tag_id FROM gutentag_taggings)\n SQL\nend\n" |