Fix tag sort.
This commit is contained in:
parent
9c4fe707c2
commit
4cc1989932
|
@ -87,7 +87,7 @@ class ArchivesController < ApplicationController
|
||||||
categories = module_app.categories.pluck(:id).map(&:to_s)
|
categories = module_app.categories.pluck(:id).map(&:to_s)
|
||||||
end
|
end
|
||||||
if tags == ["all"]
|
if tags == ["all"]
|
||||||
tags = module_app.tags.pluck(:id).map(&:to_s)
|
tags = module_app.tags.sort_by{|tag| ((module_app.asc rescue true) ? tag.sort_number.to_i : -tag.sort_number.to_i)}.map{|tag| tag.id.to_s}
|
||||||
end
|
end
|
||||||
if params[:data_count].to_i <=0
|
if params[:data_count].to_i <=0
|
||||||
page_data_count = 0
|
page_data_count = 0
|
||||||
|
|
Loading…
Reference in New Issue