Class: Incline::AccessGroupsController
- Inherits:
-
ApplicationController
- Object
- ActionController::Base
- ApplicationController
- Incline::AccessGroupsController
- Defined in:
- app/controllers/incline/access_groups_controller.rb
Instance Method Summary collapse
-
#api ⇒ Object
GET/POST /incline/access_groups/api?action=…
-
#create ⇒ Object
POST /incline/access_groups.
-
#destroy ⇒ Object
DELETE /incline/access_groups/1.
-
#edit ⇒ Object
GET /incline/access_groups/1/edit.
-
#index ⇒ Object
GET /incline/access_groups.
-
#locate ⇒ Object
POST /incline/access_groups/1/locate.
-
#new ⇒ Object
GET /incline/access_groups/new.
-
#show ⇒ Object
GET /incline/access_groups/1.
-
#update ⇒ Object
PATCH/PUT /incline/access_groups/1.
Instance Method Details
#api ⇒ Object
GET/POST /incline/access_groups/api?action=…
70 71 72 |
# File 'app/controllers/incline/access_groups_controller.rb', line 70 def api process_api_action end |
#create ⇒ Object
POST /incline/access_groups
34 35 36 37 38 39 40 41 42 43 44 45 |
# File 'app/controllers/incline/access_groups_controller.rb', line 34 def create @access_group = Incline::AccessGroup.create(access_group_params :before_create) if @access_group if @access_group.update(access_group_params :after_create) handle_update_success notice: 'Access group was successfully created.' else handle_update_failure :new end else handle_update_failure :new end end |
#destroy ⇒ Object
DELETE /incline/access_groups/1
59 60 61 62 |
# File 'app/controllers/incline/access_groups_controller.rb', line 59 def destroy @access_group.destroy handle_update_success notice: 'Access group was successfully destroyed.' end |
#edit ⇒ Object
GET /incline/access_groups/1/edit
29 30 |
# File 'app/controllers/incline/access_groups_controller.rb', line 29 def edit end |
#index ⇒ Object
GET /incline/access_groups
13 14 |
# File 'app/controllers/incline/access_groups_controller.rb', line 13 def index end |
#locate ⇒ Object
POST /incline/access_groups/1/locate
65 66 67 |
# File 'app/controllers/incline/access_groups_controller.rb', line 65 def locate render json: { record: @dt_request.record_location } end |
#new ⇒ Object
GET /incline/access_groups/new
23 24 25 |
# File 'app/controllers/incline/access_groups_controller.rb', line 23 def new @access_group = Incline::AccessGroup.new end |
#show ⇒ Object
GET /incline/access_groups/1
18 19 |
# File 'app/controllers/incline/access_groups_controller.rb', line 18 def show end |
#update ⇒ Object
PATCH/PUT /incline/access_groups/1
49 50 51 52 53 54 55 |
# File 'app/controllers/incline/access_groups_controller.rb', line 49 def update if @access_group.update(access_group_params) handle_update_success notice: 'Access group was successfully updated.' else handle_update_failure :edit end end |