Update archive_files_controller.rb

This commit is contained in:
chiu 2019-09-19 19:14:04 +08:00
parent 0dce0e1cc8
commit ed6def2dcf
1 changed files with 2 additions and 2 deletions

View File

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