Better tag cloud display

This commit is contained in:
echarp 2016-12-17 22:54:29 +01:00
parent 179ec98cf0
commit 628392093e

View File

@ -5,7 +5,7 @@ class TagsController < InheritedResources::Base
has_scope :tag, as: :id has_scope :tag, as: :id
def index def index
@tags = ActsAsTaggableOn::Tag.all @tags = ActsAsTaggableOn::Tag.where('taggings_count > 3')
if params[:term] if params[:term]
# Used to autocomplete tags # Used to autocomplete tags
@tags = @tags.select(:id, :name, 'name AS label') @tags = @tags.select(:id, :name, 'name AS label')