Class: BsmOa::AuthorizationsController
- Inherits:
-
AdminController
- Object
- BaseController
- AdminController
- BsmOa::AuthorizationsController
- Defined in:
- app/controllers/bsm_oa/authorizations_controller.rb
Instance Method Summary collapse
- #create ⇒ Object
- #destroy ⇒ Object
- #edit ⇒ Object
- #index ⇒ Object
- #new ⇒ Object
- #show ⇒ Object
- #toggle ⇒ Object
- #update ⇒ Object
Instance Method Details
#create ⇒ Object
29 30 31 32 |
# File 'app/controllers/bsm_oa/authorizations_controller.rb', line 29 def create = resource_scope.create permitted_params respond_with end |
#destroy ⇒ Object
46 47 48 49 50 |
# File 'app/controllers/bsm_oa/authorizations_controller.rb', line 46 def destroy = resource_scope.find params[:id] .destroy respond_with , location: .role end |
#edit ⇒ Object
24 25 26 27 |
# File 'app/controllers/bsm_oa/authorizations_controller.rb', line 24 def edit = resource_scope.find params[:id] respond_with end |
#index ⇒ Object
9 10 11 12 |
# File 'app/controllers/bsm_oa/authorizations_controller.rb', line 9 def index = apply_scopes(resource_scope) respond_with end |
#new ⇒ Object
19 20 21 22 |
# File 'app/controllers/bsm_oa/authorizations_controller.rb', line 19 def new = resource_scope.new respond_with end |
#show ⇒ Object
14 15 16 17 |
# File 'app/controllers/bsm_oa/authorizations_controller.rb', line 14 def show = resource_scope.find params[:id] respond_with end |
#toggle ⇒ Object
40 41 42 43 44 |
# File 'app/controllers/bsm_oa/authorizations_controller.rb', line 40 def toggle = resource_scope.find params[:id] .(params[:permission]) respond_with end |
#update ⇒ Object
34 35 36 37 38 |
# File 'app/controllers/bsm_oa/authorizations_controller.rb', line 34 def update = resource_scope.find params[:id] .update(permitted_params) respond_with end |