Update archive_files_controller.rb
This commit is contained in:
parent
0dce0e1cc8
commit
ed6def2dcf
|
@ -16,9 +16,9 @@ class Admin::ArchiveFilesController < OrbitAdminController
|
|||
end
|
||||
keys.each_with_index do |key,index|
|
||||
archivecategory = ArchiveCategory.where(category_id: key)
|
||||
puts archivecategory.inspect
|
||||
if !(values[index].empty?)
|
||||
archivecategory.first['sort_number'] = values[index].to_i
|
||||
archivecategory.first.save!
|
||||
archivecategory.first.update_attributes(sort_number: values[index].to_i)
|
||||
end
|
||||
end
|
||||
rescue => e
|
||||
|
|
Loading…
Reference in New Issue