Class: ForemanPatch::CyclesController

Inherits:
ApplicationController
  • Object
show all
Includes:
Foreman::Controller::AutoCompleteSearch
Defined in:
app/controllers/foreman_patch/cycles_controller.rb

Instance Method Summary collapse

Instance Method Details

#destroyObject



15
16
17
18
19
20
21
# File 'app/controllers/foreman_patch/cycles_controller.rb', line 15

def destroy
  if @cycle.destroy
    process_success object: @cycle
  else
    process_error object: @cycle
  end
end

#indexObject



7
8
9
10
# File 'app/controllers/foreman_patch/cycles_controller.rb', line 7

def index
  params[:order] ||= 'start_date DESC'
  @cycles = resource_base_search_and_page
end

#resource_classObject



23
24
25
# File 'app/controllers/foreman_patch/cycles_controller.rb', line 23

def resource_class
  ForemanPatch::Cycle
end

#showObject



12
13
# File 'app/controllers/foreman_patch/cycles_controller.rb', line 12

def show
end