Update archive_files_controller.rb
This commit is contained in:
parent
233c9adc8f
commit
95a775c7ac
|
@ -8,6 +8,7 @@ class Admin::ArchiveFilesController < OrbitAdminController
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
def save_categories_order
|
def save_categories_order
|
||||||
|
begin
|
||||||
keys = params['data_keys']
|
keys = params['data_keys']
|
||||||
values = params['data_values']
|
values = params['data_values']
|
||||||
keys.each do |key|
|
keys.each do |key|
|
||||||
|
@ -18,6 +19,9 @@ class Admin::ArchiveFilesController < OrbitAdminController
|
||||||
archivecategory.first.sort_number = values[index]
|
archivecategory.first.sort_number = values[index]
|
||||||
archivecategory.first.save!
|
archivecategory.first.save!
|
||||||
end
|
end
|
||||||
|
rescue => e
|
||||||
|
puts e
|
||||||
|
end
|
||||||
render :json => {}.to_json
|
render :json => {}.to_json
|
||||||
end
|
end
|
||||||
def index
|
def index
|
||||||
|
|
Loading…
Reference in New Issue