Class: ForemanPatch::Api::V2::PlansController
- Inherits:
-
BaseController
- Object
- Api::V2::BaseController
- BaseController
- ForemanPatch::Api::V2::PlansController
- Defined in:
- app/controllers/foreman_patch/api/v2/plans_controller.rb
Instance Method Summary collapse
- #create ⇒ Object
- #destroy ⇒ Object
- #index ⇒ Object
- #iterate ⇒ Object
- #resource_class ⇒ Object
- #show ⇒ Object
- #update ⇒ Object
Instance Method Details
#create ⇒ Object
41 42 43 44 |
# File 'app/controllers/foreman_patch/api/v2/plans_controller.rb', line 41 def create @plan = Plan.new(plan_params) process_response @plan.save end |
#destroy ⇒ Object
61 62 63 |
# File 'app/controllers/foreman_patch/api/v2/plans_controller.rb', line 61 def destroy process_response @plan.destroy end |
#index ⇒ Object
17 18 19 |
# File 'app/controllers/foreman_patch/api/v2/plans_controller.rb', line 17 def index @plans = resource_scope_for_index end |
#iterate ⇒ Object
55 56 57 |
# File 'app/controllers/foreman_patch/api/v2/plans_controller.rb', line 55 def iterate process_response @plan.iterate end |
#resource_class ⇒ Object
65 66 67 |
# File 'app/controllers/foreman_patch/api/v2/plans_controller.rb', line 65 def resource_class ForemanPatch::Plan end |
#show ⇒ Object
23 24 |
# File 'app/controllers/foreman_patch/api/v2/plans_controller.rb', line 23 def show end |
#update ⇒ Object
49 50 51 |
# File 'app/controllers/foreman_patch/api/v2/plans_controller.rb', line 49 def update process_response @plan.update(plan_params) end |