From cca1d0cf6884551530826bf395ddb7aca6928bf0 Mon Sep 17 00:00:00 2001 From: chiu Date: Wed, 18 Sep 2019 19:30:40 +0800 Subject: [PATCH] Update archive_files_controller.rb --- app/controllers/admin/archive_files_controller.rb | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/app/controllers/admin/archive_files_controller.rb b/app/controllers/admin/archive_files_controller.rb index e4873d5..23f666d 100644 --- a/app/controllers/admin/archive_files_controller.rb +++ b/app/controllers/admin/archive_files_controller.rb @@ -8,6 +8,7 @@ class Admin::ArchiveFilesController < OrbitAdminController end end def index + if ArchiveSortOrder.count == 0 ArchiveSortOrder.new('sort_order' => false).save end @@ -48,7 +49,9 @@ class Admin::ArchiveFilesController < OrbitAdminController render_401 end end - + def categories_order + render :text => ModuleApp.where(:key => "archive").inspect + end def create @archive_file = ArchiveFile.new(archive_vars) @archive_file.create_user_id = current_user.id