summaryrefslogtreecommitdiff
path: root/app/models/tag.rb
blob: c2cdb91cf22c08203998bdf021a0f8976718017b (plain)
1
2
3
4
5
6
7
8
9
class Tag
  def self.unique_tags
    ActsAsTaggableOn::Tag
      .joins(:taggings)
      .where(taggings: { context: 'tags' })
      .order(:name)
      .distinct
  end
end