parent
ed6def2dcf
commit
6c516780ab
|
@ -8,7 +8,6 @@ class Admin::ArchiveFilesController < OrbitAdminController
|
|||
end
|
||||
end
|
||||
def save_categories_order
|
||||
begin
|
||||
keys = params['data_keys']
|
||||
values = params['data_values']
|
||||
keys.each do |key|
|
||||
|
@ -19,11 +18,10 @@ class Admin::ArchiveFilesController < OrbitAdminController
|
|||
puts archivecategory.inspect
|
||||
if !(values[index].empty?)
|
||||
archivecategory.first.update_attributes(sort_number: values[index].to_i)
|
||||
else
|
||||
archivecategory.first.update_attributes(sort_number: nil)
|
||||
end
|
||||
end
|
||||
rescue => e
|
||||
puts e
|
||||
end
|
||||
render :json => {}.to_json
|
||||
end
|
||||
def index
|
||||
|
|
Loading…
Reference in New Issue