Class: Authz::ControllerActionsController Private
- Inherits:
-
ApplicationController
- Object
- ApplicationController
- ApplicationController
- Authz::ControllerActionsController
- Defined in:
- app/controllers/authz/controller_actions_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 Authz::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.
20 21 22 23 24 25 26 27 28 29 |
# File 'app/controllers/authz/controller_actions_controller.rb', line 20 def create @controller_action = ControllerAction.new(controller_action_create_params) if @controller_action.save flash[:success] = "#{@controller_action.to_s} created successfully" redirect_to controller_action_path(@controller_action) else flash.now[:error] = "There was an issue creating this controller action" 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.
46 47 48 49 50 51 52 53 54 55 |
# File 'app/controllers/authz/controller_actions_controller.rb', line 46 def destroy @controller_action = ControllerAction.find(params[:id]) if @controller_action.destroy flash[:success] = "#{@controller_action.to_s} destroyed successfully" redirect_to controller_actions_path else flash.now[:error] = "There was an issue destroying #{@controller_action.to_s}" 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.
31 32 33 |
# File 'app/controllers/authz/controller_actions_controller.rb', line 31 def edit @controller_action = ControllerAction.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.
6 7 8 |
# File 'app/controllers/authz/controller_actions_controller.rb', line 6 def index @controller_actions = ControllerAction.all.order(created_at: :desc).page(params[:controller_actions_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.
16 17 18 |
# File 'app/controllers/authz/controller_actions_controller.rb', line 16 def new @controller_action = ControllerAction.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.
10 11 12 13 14 |
# File 'app/controllers/authz/controller_actions_controller.rb', line 10 def show @controller_action = ControllerAction.find(params[:id]) @associated_business_processes = @controller_action.business_processes.distinct.page(params[:business_processes_page]).per(10) @associated_roles = @controller_action.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.
35 36 37 38 39 40 41 42 43 44 |
# File 'app/controllers/authz/controller_actions_controller.rb', line 35 def update @controller_action = ControllerAction.find(params[:id]) if @controller_action.update(controller_action_update_params) flash[:success] = "#{@controller_action.to_s} updated successfully" redirect_to controller_action_path(@controller_action) else flash.now[:error] = "There was an issue updating #{@controller_action.to_s}" render 'edit' end end |