Sha256: 1b17f0af01efe14b8a02c5326909d852fe00bc6d59cd213f0bf7dc1c4faec603

Contents?: true

Size: 301 Bytes

Versions: 12

Compression:

Stored size: 301 Bytes

Contents

module Reorder::PagesControllerExtensions

  %w{move_higher move_lower move_to_top move_to_bottom}.each do |action|
    define_method action do
      @page = Page.find(params[:page_id])
      @page.parent.reload.children.reload
      @page.send(action)
      response_for :update
    end
  end
  
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
trusty-reorder-extension-2.0.6 lib/reorder/pages_controller_extensions.rb
trusty-reorder-extension-2.0.5 lib/reorder/pages_controller_extensions.rb
trusty-reorder-extension-2.0.4 lib/reorder/pages_controller_extensions.rb
trusty-reorder-extension-2.0.3 lib/reorder/pages_controller_extensions.rb
trusty-reorder-extension-2.0.2 lib/reorder/pages_controller_extensions.rb
trusty-reorder-extension-2.0.1.pre.beta lib/reorder/pages_controller_extensions.rb
trusty-reorder-extension-2.0.0.pre.beta lib/reorder/pages_controller_extensions.rb
trusty-reorder-extension-1.1.0 lib/reorder/pages_controller_extensions.rb
trusty-reorder-extension-1.0.3 lib/reorder/pages_controller_extensions.rb
trusty-reorder-extension-1.0.2 lib/reorder/pages_controller_extensions.rb
trusty-reorder-extension-1.0.1 lib/reorder/pages_controller_extensions.rb
trusty-reorder-extension-1.0.0 lib/reorder/pages_controller_extensions.rb