Class: Incline::SecurityController
- Inherits:
-
ApplicationController
- Object
- ActionController::Base
- ApplicationController
- Incline::SecurityController
- Defined in:
- app/controllers/incline/security_controller.rb
Instance Method Summary collapse
-
#api ⇒ Object
GET/POST /incline/security/api?action=…
-
#edit ⇒ Object
GET /incline/security/1/edit.
-
#index ⇒ Object
GET /incline/security.
-
#locate ⇒ Object
POST /incline/security/1/locate.
-
#show ⇒ Object
GET /incline/security/1.
-
#update ⇒ Object
PATCH/PUT /incline/security/1.
Instance Method Details
#api ⇒ Object
GET/POST /incline/security/api?action=…
51 52 53 |
# File 'app/controllers/incline/security_controller.rb', line 51 def api process_api_action end |
#edit ⇒ Object
GET /incline/security/1/edit
32 33 |
# File 'app/controllers/incline/security_controller.rb', line 32 def edit end |
#index ⇒ Object
GET /incline/security
13 14 15 16 17 18 19 20 21 22 23 |
# File 'app/controllers/incline/security_controller.rb', line 13 def index @lists = {} unless @dt_request.provided? Incline::ActionSecurity.valid_items # ensure only valid items are in the database. # build lists for the dropdown filters. @lists[:controller_name] = Incline::ActionSecurity.visible.pluck(:controller_name).uniq.sort @lists[:action_name] = Incline::ActionSecurity.visible.pluck(:action_name).uniq.sort @lists[:short_permitted] = Incline::ActionSecurity::SHORT_PERMITTED_FILTERS end end |
#locate ⇒ Object
POST /incline/security/1/locate
46 47 48 |
# File 'app/controllers/incline/security_controller.rb', line 46 def locate render json: { record: @dt_request.record_location } end |
#show ⇒ Object
GET /incline/security/1
27 28 |
# File 'app/controllers/incline/security_controller.rb', line 27 def show end |
#update ⇒ Object
PATCH/PUT /incline/security/1
37 38 39 40 41 42 43 |
# File 'app/controllers/incline/security_controller.rb', line 37 def update if @security.update(security_params) handle_update_success notice: 'Action security was successfully updated.' else handle_update_failure :edit end end |