Class: ForemanPatch::Api::V2::CyclesController

Inherits:
BaseController
  • Object
show all
Defined in:
app/controllers/foreman_patch/api/v2/cycles_controller.rb

Instance Method Summary collapse

Instance Method Details

#createObject



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

#destroyObject



55
56
57
# File 'app/controllers/foreman_patch/api/v2/cycles_controller.rb', line 55

def destroy
  process_response @cycle.destroy
end

#indexObject



20
21
22
# File 'app/controllers/foreman_patch/api/v2/cycles_controller.rb', line 20

def index
  @cycles = resource_scope_for_index
end

#resource_classObject



59
60
61
# File 'app/controllers/foreman_patch/api/v2/cycles_controller.rb', line 59

def resource_class
  ForemanPatch::Cycle
end

#showObject



26
27
# File 'app/controllers/foreman_patch/api/v2/cycles_controller.rb', line 26

def show
end

#updateObject



49
50
51
# File 'app/controllers/foreman_patch/api/v2/cycles_controller.rb', line 49

def update
  process_response @cycle.update(cycle_params)
end