4 5 6 7 8 9
# File 'lib/gutentag/remove_unused.rb', line 4 def self.call Gutentag::Tag.connection.execute <<-SQL DELETE FROM gutentag_tags WHERE id NOT IN (SELECT DISTINCT tag_id FROM gutentag_taggings) SQL end