Sha256: da65d5ea2805c42176c2ef1adcb448bc0742e7ea5ba9e8e98e92f65d77842bb5

Contents?: true

Size: 253 Bytes

Versions: 3

Compression:

Stored size: 253 Bytes

Contents

module Adminpanel
  module SortableActions
    extend ActiveSupport::Concern

    def move_to_position
      resource = @model.find(params[:id])

      resource.move_to_position(params[:position].to_i)
      render json: {status: :ok}
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
adminpanel-2.5.2 app/controllers/concerns/adminpanel/sortable_actions.rb
adminpanel-2.5.1 app/controllers/concerns/adminpanel/sortable_actions.rb
adminpanel-2.5.0 app/controllers/concerns/adminpanel/sortable_actions.rb