Sha256: 9ab3392697570e49ee70a1a0ffb097d2be6e288aa73c96790666a619b159b6fa

Contents?: true

Size: 206 Bytes

Versions: 23

Compression:

Stored size: 206 Bytes

Contents

class ThingsController < ApplicationController
  def index
    @things = Thing.ordered_by_position_asc
  end

  def move
    @thing = Thing.find(params[:id])
    @thing.move_to! params[:position]
  end
end

Version data entries

23 entries across 8 versions & 1 rubygems

Version Path
activerecord-sortable-0.0.8 spec/dummy-3.2/app/controllers/things_controller.rb
activerecord-sortable-0.0.8 spec/dummy-4.2/app/controllers/things_controller.rb
activerecord-sortable-0.0.8 spec/dummy-4.1/app/controllers/things_controller.rb
activerecord-sortable-0.0.8 spec/dummy-4.0/app/controllers/things_controller.rb
activerecord-sortable-0.0.7 spec/dummy-4.0/app/controllers/things_controller.rb
activerecord-sortable-0.0.7 spec/dummy-4.2/app/controllers/things_controller.rb
activerecord-sortable-0.0.7 spec/dummy-4.1/app/controllers/things_controller.rb
activerecord-sortable-0.0.7 spec/dummy-3.2/app/controllers/things_controller.rb
activerecord-sortable-0.0.6 spec/dummy-3.2/app/controllers/things_controller.rb
activerecord-sortable-0.0.6 spec/dummy-4.0/app/controllers/things_controller.rb
activerecord-sortable-0.0.6 spec/dummy-4.1/app/controllers/things_controller.rb
activerecord-sortable-0.0.6 spec/dummy-4.2/app/controllers/things_controller.rb
activerecord-sortable-0.0.5 spec/dummy-3.2/app/controllers/things_controller.rb
activerecord-sortable-0.0.5 spec/dummy-4.2/app/controllers/things_controller.rb
activerecord-sortable-0.0.5 spec/dummy-4.1/app/controllers/things_controller.rb
activerecord-sortable-0.0.5 spec/dummy-4.0/app/controllers/things_controller.rb
activerecord-sortable-0.0.4 spec/dummy-3.2/app/controllers/things_controller.rb
activerecord-sortable-0.0.4 spec/dummy-4.2/app/controllers/things_controller.rb
activerecord-sortable-0.0.4 spec/dummy-4.1/app/controllers/things_controller.rb
activerecord-sortable-0.0.4 spec/dummy-4.0/app/controllers/things_controller.rb