parent
19cac89286
commit
a2cf89f090
|
@ -73,8 +73,8 @@ class Admin::ArchiveFilesController < OrbitAdminController
|
||||||
ArchiveCategory.create(category_id: category.id.to_s)
|
ArchiveCategory.create(category_id: category.id.to_s)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
cats_with_nil = ArchiveCategory.all.in(sort_number: nil).order_by(sort_number: 'desc')
|
cats_with_nil = ArchiveCategory.all.in(sort_number: nil)
|
||||||
cats_no_nil = ArchiveCategory.all.not_in(sort_number: nil)
|
cats_no_nil = ArchiveCategory.all.not_in(sort_number: nil).order_by(sort_number: 'desc')
|
||||||
@cats = cats_no_nil.concat(cats_with_nil).collect do |cat|
|
@cats = cats_no_nil.concat(cats_with_nil).collect do |cat|
|
||||||
[categories.where(:_id => cat.category_id).first,cat.sort_number.to_s]
|
[categories.where(:_id => cat.category_id).first,cat.sort_number.to_s]
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue