Sha256: dc9af650071e6f81e73254a3d7ef8c079b1db9997ef11d67f0894ae194be402d

Contents?: true

Size: 353 Bytes

Versions: 6

Compression:

Stored size: 353 Bytes

Contents

# coding: utf-8

class Redditor::Admin::PagesController < Redditor::Admin::BaseController
  layout false

  def sort
    params[:sort].each do |k, v|
      v.each do |klass, info|
        klass.camelcase.constantize.find_by_id(info[:index]).update_attributes(position: info[:position]) rescue nil
      end
    end

    render :nothing => true
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
redditor-0.1.5 app/controllers/redditor/admin/pages_controller.rb
redditor-0.1.4 app/controllers/redditor/admin/pages_controller.rb
redditor-0.1.3 app/controllers/redditor/admin/pages_controller.rb
redditor-0.1.2 app/controllers/redditor/admin/pages_controller.rb
redditor-0.1.1 app/controllers/redditor/admin/pages_controller.rb
redditor-0.1.0 app/controllers/redditor/admin/pages_controller.rb