Class: BsmOa::ApplicationsController
- Inherits:
-
AdminController
- Object
- BaseController
- AdminController
- BsmOa::ApplicationsController
- Defined in:
- app/controllers/bsm_oa/applications_controller.rb
Instance Method Summary collapse
- #create ⇒ Object
- #destroy ⇒ Object
- #edit ⇒ Object
- #index ⇒ Object
- #new ⇒ Object
- #show ⇒ Object
- #update ⇒ Object
Instance Method Details
#create ⇒ Object
25 26 27 28 |
# File 'app/controllers/bsm_oa/applications_controller.rb', line 25 def create @application = resource_scope.create permitted_params respond_with @application end |
#destroy ⇒ Object
35 36 37 38 |
# File 'app/controllers/bsm_oa/applications_controller.rb', line 35 def destroy resource.destroy respond_with resource, location: bsm_oa_applications_path end |
#edit ⇒ Object
21 22 23 |
# File 'app/controllers/bsm_oa/applications_controller.rb', line 21 def edit respond_with resource end |
#index ⇒ Object
7 8 9 10 |
# File 'app/controllers/bsm_oa/applications_controller.rb', line 7 def index @applications = apply_scopes(resource_scope) respond_with @applications end |
#new ⇒ Object
16 17 18 19 |
# File 'app/controllers/bsm_oa/applications_controller.rb', line 16 def new @application = resource_scope.new respond_with @application end |
#show ⇒ Object
12 13 14 |
# File 'app/controllers/bsm_oa/applications_controller.rb', line 12 def show respond_with resource end |
#update ⇒ Object
30 31 32 33 |
# File 'app/controllers/bsm_oa/applications_controller.rb', line 30 def update resource.update(permitted_params) respond_with resource end |