parent
f42b175f8b
commit
233c9adc8f
|
@ -8,7 +8,16 @@ class Admin::ArchiveFilesController < OrbitAdminController
|
|||
end
|
||||
end
|
||||
def save_categories_order
|
||||
puts ['1test2',params.inspect]
|
||||
keys = params['data_keys']
|
||||
values = params['data_values']
|
||||
keys.each do |key|
|
||||
key.slice! 'sort_number-'
|
||||
end
|
||||
keys.each_with_index do |key,index|
|
||||
archivecategory = ArchiveCategory.all.where(category_id: key)
|
||||
archivecategory.first.sort_number = values[index]
|
||||
archivecategory.first.save!
|
||||
end
|
||||
render :json => {}.to_json
|
||||
end
|
||||
def index
|
||||
|
|
Loading…
Reference in New Issue