Class: CurationConcerns::WorkflowActionsController

Inherits:
ApplicationController show all
Defined in:
app/controllers/curation_concerns/workflow_actions_controller.rb

Instance Method Summary collapse

Methods included from ApplicationControllerBehavior

#deny_access, #render_404, #render_json_response

Instance Method Details

#updateObject



5
6
7
8
9
10
11
12
13
14
15
16
17
# File 'app/controllers/curation_concerns/workflow_actions_controller.rb', line 5

def update
  work = ActiveFedora::Base.find(params[:id])
  workflow_action_form = CurationConcerns::Forms::WorkflowActionForm.new(
    current_ability: current_ability,
    work: work,
    attributes: workflow_action_params
  )
  if workflow_action_form.save
    redirect_to [main_app, work], notice: "The #{work.human_readable_type} has been updated."
  else
    render 'curation_concerns/base/unauthorized', status: :unauthorized
  end
end