Class: ForemanPatch::Api::V2::WindowPlansController
- Inherits:
-
BaseController
- Object
- Api::V2::BaseController
- BaseController
- ForemanPatch::Api::V2::WindowPlansController
- Defined in:
- app/controllers/foreman_patch/api/v2/window_plans_controller.rb
Instance Method Summary collapse
- #create ⇒ Object
- #destroy ⇒ Object
- #index ⇒ Object
- #resource_class ⇒ Object
- #show ⇒ Object
- #update ⇒ Object
Instance Method Details
#create ⇒ Object
40 41 42 43 |
# File 'app/controllers/foreman_patch/api/v2/window_plans_controller.rb', line 40 def create @window_plan = WindowPlan.new(window_plan_params) process_response @window_plan.save end |
#destroy ⇒ Object
54 55 56 |
# File 'app/controllers/foreman_patch/api/v2/window_plans_controller.rb', line 54 def destroy process_response @window_plan.destroy end |
#index ⇒ Object
18 19 20 |
# File 'app/controllers/foreman_patch/api/v2/window_plans_controller.rb', line 18 def index @window_plans = resource_scope_for_index(params.permit(:plan_id)) end |
#resource_class ⇒ Object
58 59 60 |
# File 'app/controllers/foreman_patch/api/v2/window_plans_controller.rb', line 58 def resource_class ForemanPatch::WindowPlan end |
#show ⇒ Object
24 25 |
# File 'app/controllers/foreman_patch/api/v2/window_plans_controller.rb', line 24 def show end |
#update ⇒ Object
48 49 50 |
# File 'app/controllers/foreman_patch/api/v2/window_plans_controller.rb', line 48 def update process_response @window_plan.update(window_plan_params) end |