Class: Authz::BusinessProcessesController Private
- Inherits:
-
ApplicationController
- Object
- ApplicationController
- ApplicationController
- Authz::BusinessProcessesController
- Defined in:
- app/controllers/authz/business_processes_controller.rb
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
Instance Method Summary collapse
- #create ⇒ Object private
- #destroy ⇒ Object private
- #edit ⇒ Object private
- #index ⇒ Object private
- #new ⇒ Object private
- #show ⇒ Object private
- #update ⇒ Object private
Methods included from Controllers::AuthorizationManager
#apply_authz_scopes, #authorize, #authorized?, #authorized_path?, #skip_authorization, #verify_authorized
Instance Method Details
#create ⇒ Object
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.
21 22 23 24 25 26 27 28 29 30 |
# File 'app/controllers/authz/business_processes_controller.rb', line 21 def create @business_process = BusinessProcess.new(business_process_params) if @business_process.save redirect_to business_process_path(@business_process) flash[:success] = "#{@business_process.name} created successfully" else flash.now[:error] = "There was an issue creating this business process" render 'new' end end |
#destroy ⇒ Object
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.
47 48 49 50 51 52 53 54 55 56 |
# File 'app/controllers/authz/business_processes_controller.rb', line 47 def destroy @business_process = BusinessProcess.find(params[:id]) if @business_process.destroy flash[:success] = "#{@business_process.name} destroyed successfully" redirect_to business_processes_path else flash.now[:error] = "There was an issue destroying #{@business_process.name}" render 'show' end end |
#edit ⇒ Object
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.
32 33 34 |
# File 'app/controllers/authz/business_processes_controller.rb', line 32 def edit @business_process = BusinessProcess.find(params[:id]) end |
#index ⇒ Object
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.
7 8 9 |
# File 'app/controllers/authz/business_processes_controller.rb', line 7 def index @business_processes = BusinessProcess.all.order(created_at: :desc).page(params[:business_processes_page]) end |
#new ⇒ Object
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.
17 18 19 |
# File 'app/controllers/authz/business_processes_controller.rb', line 17 def new @business_process = BusinessProcess.new end |
#show ⇒ Object
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.
11 12 13 14 15 |
# File 'app/controllers/authz/business_processes_controller.rb', line 11 def show @business_process = BusinessProcess.find(params[:id]) @associated_controller_actions = @business_process.controller_actions.distinct.page(params[:controller_actions_page]).per(10) @associated_roles = @business_process.roles.distinct.page(params[:roles_page]).per(10) end |
#update ⇒ Object
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.
36 37 38 39 40 41 42 43 44 45 |
# File 'app/controllers/authz/business_processes_controller.rb', line 36 def update @business_process = BusinessProcess.find(params[:id]) if @business_process.update(business_process_params) flash[:success] = "#{@business_process.name} updated successfully" redirect_to business_process_path(@business_process) else flash.now[:error] = "There was an issue updating this business process" render 'edit' end end |