Update archive_files_controller.rb
This commit is contained in:
parent
0dce0e1cc8
commit
ed6def2dcf
|
@ -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
|
||||||
|
|
Loading…
Reference in New Issue