Update archives_controller.rb
This commit is contained in:
parent
08cbf76447
commit
2284234283
|
@ -20,7 +20,7 @@ class ArchivesController < ApplicationController
|
|||
all_categories_id = all_categories_no_nil.concat(all_categories_with_nil).collect do |cat|
|
||||
cat.category_id.to_s
|
||||
end
|
||||
categories_sort = categories.select{|category| all_categories_id.include? category.id.to_s}[0]
|
||||
categories_sort = categories.select{|category| all_categories_id.include? category.id.to_s}
|
||||
cats_last = []
|
||||
categories_sort.each do |category|
|
||||
url_to_edit = ""
|
||||
|
@ -85,7 +85,7 @@ class ArchivesController < ApplicationController
|
|||
all_categories_id = all_categories_no_nil.concat(all_categories_with_nil).collect do |cat|
|
||||
cat.category_id.to_s
|
||||
end
|
||||
categories_sort = categories.select{|category| all_categories_id.include? category.id.to_s}[0]
|
||||
categories_sort = categories.select{|category| all_categories_id.include? category.id.to_s}
|
||||
cats = categories_sort.collect do |category|
|
||||
url_to_edit = OrbitHelper.user_has_cateogry?(category) ? "/admin/archive_files?filters[category][]=#{category.id.to_s}" : ""
|
||||
archives = files_by_cateogry[category].collect do |archive|
|
||||
|
|
Loading…
Reference in New Issue