Class: ForemanPatch::Api::V2::CyclesController
- Inherits:
-
BaseController
- Object
- Api::V2::BaseController
- BaseController
- ForemanPatch::Api::V2::CyclesController
- Defined in:
- app/controllers/foreman_patch/api/v2/cycles_controller.rb
Instance Method Summary collapse
- #create ⇒ Object
- #destroy ⇒ Object
- #index ⇒ Object
- #resource_class ⇒ Object
- #show ⇒ Object
- #update ⇒ Object
Instance Method Details
#create ⇒ Object
42 43 44 45 |
# File 'app/controllers/foreman_patch/api/v2/cycles_controller.rb', line 42 def create @cycle = Cycle.new(cycle_params) process_response @cycle.save end |
#destroy ⇒ Object
55 56 57 |
# File 'app/controllers/foreman_patch/api/v2/cycles_controller.rb', line 55 def destroy process_response @cycle.destroy end |
#index ⇒ Object
20 21 22 |
# File 'app/controllers/foreman_patch/api/v2/cycles_controller.rb', line 20 def index @cycles = resource_scope_for_index end |
#resource_class ⇒ Object
59 60 61 |
# File 'app/controllers/foreman_patch/api/v2/cycles_controller.rb', line 59 def resource_class ForemanPatch::Cycle end |
#show ⇒ Object
26 27 |
# File 'app/controllers/foreman_patch/api/v2/cycles_controller.rb', line 26 def show end |
#update ⇒ Object
49 50 51 |
# File 'app/controllers/foreman_patch/api/v2/cycles_controller.rb', line 49 def update process_response @cycle.update(cycle_params) end |