Update archive_files_controller.rb

fix error
This commit is contained in:
chiu 2019-09-19 19:09:00 +08:00
parent 56563df6e1
commit e3923bb5ff
1 changed files with 4 additions and 2 deletions

View File

@ -16,8 +16,10 @@ class Admin::ArchiveFilesController < OrbitAdminController
end
keys.each_with_index do |key,index|
archivecategory = ArchiveCategory.where(category_id: key)
archivecategory.first.sort_number = values[index]
archivecategory.first.save!
if !(values[index].empty?)
archivecategory.first['sort_number'] = values[index]_.to_i
archivecategory.first.save!
end
end
rescue => e
puts e