From 2e07c02caf9128bfe459b4f2ff97e3014f67c3d5 Mon Sep 17 00:00:00 2001 From: chiu Date: Thu, 19 Sep 2019 22:15:46 +0800 Subject: [PATCH] Update archives_controller.rb --- app/controllers/archives_controller.rb | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/app/controllers/archives_controller.rb b/app/controllers/archives_controller.rb index 57e0fde..90ce505 100644 --- a/app/controllers/archives_controller.rb +++ b/app/controllers/archives_controller.rb @@ -1,5 +1,6 @@ class ArchivesController < ApplicationController def index + begin #the first 7 lines are write to avoid the categories to be not in the ArchiveCategory categories_temp = ModuleApp.where(:key => "archive").first.categories categories_temp.each do |category| @@ -193,6 +194,9 @@ class ArchivesController < ApplicationController end end end + rescue -> e + puts e + end { "categories" => cats_last }