This commit is contained in:
@@ -17,6 +17,7 @@ class TagsController < ApplicationController
|
|||||||
return render json: [] if q.blank?
|
return render json: [] if q.blank?
|
||||||
|
|
||||||
with_nico = !(params[:nico].to_s.strip.downcase.in?(['0', 'false', 'off', 'no']))
|
with_nico = !(params[:nico].to_s.strip.downcase.in?(['0', 'false', 'off', 'no']))
|
||||||
|
with_empty = params[:empty].to_s.strip.downcase.in?(['1', 'true', 'on', 'yes'])
|
||||||
|
|
||||||
alias_rows =
|
alias_rows =
|
||||||
TagName
|
TagName
|
||||||
@@ -33,6 +34,7 @@ class TagsController < ApplicationController
|
|||||||
end
|
end
|
||||||
|
|
||||||
base = Tag.joins(:tag_name).includes(:tag_name)
|
base = Tag.joins(:tag_name).includes(:tag_name)
|
||||||
|
base = base.where('tags.post_count > 0') unless with_empty
|
||||||
|
|
||||||
canonical_hit =
|
canonical_hit =
|
||||||
base
|
base
|
||||||
|
|||||||
Reference in New Issue
Block a user