Update archives_controller.rb

This commit is contained in:
chiu 2019-09-19 22:15:46 +08:00
parent c4dec8d0b4
commit 2e07c02caf
1 changed files with 4 additions and 0 deletions

View File

@ -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
}