Class: AccessGroupsController
- Inherits:
-
ApplicationController
- Object
- ActionController::Base
- BarkestCore::ApplicationControllerBase
- ApplicationController
- AccessGroupsController
- Defined in:
- app/controllers/access_groups_controller.rb
Overview
This is the controller that allows managing the access groups used for authorizing access to resources.
Instance Method Summary collapse
-
#create ⇒ Object
POST /access_groups.
-
#destroy ⇒ Object
DELETE /access_groups/1.
-
#edit ⇒ Object
GET /access_groups/1/edit.
-
#index ⇒ Object
GET /access_groups.
-
#new ⇒ Object
GET /access_groups/new.
-
#show ⇒ Object
GET /access_groups/1.
-
#update ⇒ Object
PATCH/PUT /access_groups/1.
Methods inherited from BarkestCore::ApplicationControllerBase
#authorize!, #show_denial_reason?
Methods included from BarkestCore::StatusHelper
#clear_system_status, #show_system_status, #status_button_label, #status_redirect_url
Methods included from BarkestCore::RecaptchaHelper
#add_recaptcha_challenge, #verify_recaptcha_challenge
Methods included from BarkestCore::SessionsHelper
#current_user, #current_user?, #forget, #log_in, #log_out, #logged_in?, #redirect_back_or, #remember, #store_location, #store_location_and_redirect_to, #system_admin?
Instance Method Details
#create ⇒ Object
POST /access_groups
32 33 34 35 36 37 38 39 40 |
# File 'app/controllers/access_groups_controller.rb', line 32 def create @access_group = AccessGroup.new(access_group_params) if @access_group.save redirect_to access_groups_url, notice: 'Access group was successfully created.' else render :new end end |
#destroy ⇒ Object
DELETE /access_groups/1
54 55 56 57 |
# File 'app/controllers/access_groups_controller.rb', line 54 def destroy @access_group.destroy redirect_to access_groups_url, notice: 'Access group was successfully destroyed.' end |
#edit ⇒ Object
GET /access_groups/1/edit
27 28 |
# File 'app/controllers/access_groups_controller.rb', line 27 def edit end |
#index ⇒ Object
GET /access_groups
10 11 12 |
# File 'app/controllers/access_groups_controller.rb', line 10 def index @access_groups = AccessGroup.all.sorted end |
#new ⇒ Object
GET /access_groups/new
21 22 23 |
# File 'app/controllers/access_groups_controller.rb', line 21 def new @access_group = AccessGroup.new end |
#show ⇒ Object
GET /access_groups/1
16 17 |
# File 'app/controllers/access_groups_controller.rb', line 16 def show end |
#update ⇒ Object
PATCH/PUT /access_groups/1
44 45 46 47 48 49 50 |
# File 'app/controllers/access_groups_controller.rb', line 44 def update if @access_group.update(access_group_params) redirect_to access_groups_url, notice: 'Access group was successfully updated.' else render :edit end end |