Method: Pageflow::StorylinesController#order

Defined in:
app/controllers/pageflow/storylines_controller.rb

#orderObject

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



40
41
42
43
44
45
46
47
48
49
50
# File 'app/controllers/pageflow/storylines_controller.rb', line 40

def order
  entry = DraftEntry.find(params[:entry_id])

  authorize!(:edit_outline, entry.to_model)
  verify_edit_lock!(entry)
  params.require(:ids).each_with_index do |id, index|
    entry.storylines.find(id).update(position: index)
  end

  head :no_content
end