Update archives_controller.rb

This commit is contained in:
chiu 2019-09-20 14:21:17 +08:00
parent 132fd8aa4b
commit 185b16d7fe
1 changed files with 2 additions and 2 deletions

View File

@ -262,7 +262,7 @@ F cats = files_by_cateogry.keys.collect do |cat|
if categories.first == "all"
categories = OrbitHelper.widget_module_app.categories
puts categories
categories_sort = get_sorted_cat_with_filter(categories,'orm')
categories_sort = get_sorted_cat_with_filter(categories,'id')
@categories = categories_sort.collect do |cat|
{
"title" => cat.title,
@ -334,7 +334,7 @@ F cats = files_by_cateogry.keys.collect do |cat|
end
if cat_type=='id'
categories_temp = ModuleApp.where(:key => "archive").first.categories
categories = categories_temp.where(id: categories)
categories = categories_temp.where(_id: categories)
end
categories_sort = []
all_categories_id.each do |cat_id|