parent
93c25e65b0
commit
19cac89286
|
@ -73,7 +73,7 @@ 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)
|
cats_with_nil = ArchiveCategory.all.in(sort_number: nil).order_by(sort_number: 'desc')
|
||||||
cats_no_nil = ArchiveCategory.all.not_in(sort_number: nil)
|
cats_no_nil = ArchiveCategory.all.not_in(sort_number: nil)
|
||||||
@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]
|
||||||
|
|
Loading…
Reference in New Issue