Class: CurationConcerns::Admin::WorkflowRolesController
Instance Method Summary
collapse
#deny_access, #render_404, #render_json_response
Instance Method Details
#create ⇒ Object
18
19
20
21
22
23
24
25
26
27
|
# File 'app/controllers/curation_concerns/admin/workflow_roles_controller.rb', line 18
def create
authorize! :create, Sipity::WorkflowResponsibility
form = Forms::WorkflowResponsibilityForm.new(params[:sipity_workflow_responsibility])
begin
form.save!
rescue ActiveRecord::RecordNotUnique
logger.info "Not unique *****\n\n\n"
end
redirect_to admin_workflow_roles_path
end
|
#destroy ⇒ Object
11
12
13
14
15
16
|
# File 'app/controllers/curation_concerns/admin/workflow_roles_controller.rb', line 11
def destroy
responsibility = Sipity::WorkflowResponsibility.find(params[:id])
authorize! :destroy, responsibility
responsibility.destroy
redirect_to admin_workflow_roles_path
end
|
#index ⇒ Object
7
8
9
|
# File 'app/controllers/curation_concerns/admin/workflow_roles_controller.rb', line 7
def index
@presenter = WorkflowRolePresenter.new
end
|