Sha256: c0c80941b9ffdf19752b24891dda5df2478d1160c166a3e000306d1075e7d822

Contents?: true

Size: 747 Bytes

Versions: 13

Compression:

Stored size: 747 Bytes

Contents

module CurationConcerns
  class WorkflowActionsController < ApplicationController
    before_action :authenticate_user!

    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

    private

      def workflow_action_params
        params.require(:workflow_action).permit(:name, :comment)
      end
  end
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
curation_concerns-1.7.8 app/controllers/curation_concerns/workflow_actions_controller.rb
curation_concerns-1.7.7 app/controllers/curation_concerns/workflow_actions_controller.rb
curation_concerns-2.0.0 app/controllers/curation_concerns/workflow_actions_controller.rb
curation_concerns-2.0.0.rc2 app/controllers/curation_concerns/workflow_actions_controller.rb
curation_concerns-1.7.6 app/controllers/curation_concerns/workflow_actions_controller.rb
curation_concerns-1.7.5 app/controllers/curation_concerns/workflow_actions_controller.rb
curation_concerns-1.7.4 app/controllers/curation_concerns/workflow_actions_controller.rb
curation_concerns-1.7.3 app/controllers/curation_concerns/workflow_actions_controller.rb
curation_concerns-1.7.2 app/controllers/curation_concerns/workflow_actions_controller.rb
curation_concerns-2.0.0.rc1 app/controllers/curation_concerns/workflow_actions_controller.rb
curation_concerns-1.7.1 app/controllers/curation_concerns/workflow_actions_controller.rb
curation_concerns-1.7.0 app/controllers/curation_concerns/workflow_actions_controller.rb
curation_concerns-1.7.0.beta1 app/controllers/curation_concerns/workflow_actions_controller.rb