From f0ddd898b4210fe722df19b742c5263cc9f748c5 Mon Sep 17 00:00:00 2001 From: chiu Date: Fri, 20 Sep 2019 13:37:58 +0800 Subject: [PATCH] Update archives_controller.rb --- app/controllers/archives_controller.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/controllers/archives_controller.rb b/app/controllers/archives_controller.rb index 7fa56b1..7e4c79f 100644 --- a/app/controllers/archives_controller.rb +++ b/app/controllers/archives_controller.rb @@ -329,9 +329,10 @@ F cats = files_by_cateogry.keys.collect do |cat| def get_all_categories_id_sorted all_categories_with_nil = ArchiveCategory.all.in(sort_number: nil) all_categories_no_nil = ArchiveCategory.all.not_in(sort_number: nil).order_by(sort_number: 'desc') - all_categories_no_nil.concat(all_categories_with_nil).collect do |cat| + all_categories_id = all_categories_no_nil.concat(all_categories_with_nil).collect do |cat| cat.category_id.to_s end + all_categories_id end def check_cat_sort_data categories_temp = ModuleApp.where(:key => "archive").first.categories