Module: Adminpanel::SortableActions

Extended by:
ActiveSupport::Concern
Included in:
ApplicationController
Defined in:
app/controllers/concerns/adminpanel/sortable_actions.rb

Instance Method Summary collapse

Instance Method Details

#move_to_betterObject



5
6
7
8
9
10
# File 'app/controllers/concerns/adminpanel/sortable_actions.rb', line 5

def move_to_better
  resource = @model.find(params[:id])
  resource.move_to_better_position
  update_index_table

end

#move_to_worstObject



12
13
14
15
16
# File 'app/controllers/concerns/adminpanel/sortable_actions.rb', line 12

def move_to_worst
  resource = @model.find(params[:id])
  resource.move_to_worst_position
  update_index_table
end