Sha256: ec60f40969463a44218e4dfc217120e5ea18cb6a20a72c2d536050497da7d395

Contents?: true

Size: 368 Bytes

Versions: 4

Compression:

Stored size: 368 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|
        "Redditor::#{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

4 entries across 4 versions & 1 rubygems

Version Path
redditor-0.1.9 app/controllers/redditor/admin/pages_controller.rb
redditor-0.1.8 app/controllers/redditor/admin/pages_controller.rb
redditor-0.1.7 app/controllers/redditor/admin/pages_controller.rb
redditor-0.1.6 app/controllers/redditor/admin/pages_controller.rb