class Gutentag::RemoveUnused

Public Class Methods

call() click to toggle source
# 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