diff --git a/app/controllers/archives_controller.rb b/app/controllers/archives_controller.rb index 7fc2662..fd42ede 100644 --- a/app/controllers/archives_controller.rb +++ b/app/controllers/archives_controller.rb @@ -87,7 +87,7 @@ class ArchivesController < ApplicationController categories = module_app.categories.pluck(:id).map(&:to_s) end 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 if params[:data_count].to_i <=0 page_data_count = 0