Class: ForemanPatch::Api::V2::RoundsController

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

Instance Method Summary collapse

Instance Method Details

#createObject



46
47
48
49
# File 'app/controllers/foreman_patch/api/v2/rounds_controller.rb', line 46

def create
  @round = Round.new(round_params)
  process_response @round.save
end

#destroyObject



60
61
62
# File 'app/controllers/foreman_patch/api/v2/rounds_controller.rb', line 60

def destroy
  process_response @round.destroy
end

#indexObject



19
20
21
# File 'app/controllers/foreman_patch/api/v2/rounds_controller.rb', line 19

def index
  @rounds = resource_scope_for_index(params.permit(:window_id))
end

#resource_classObject



64
65
66
# File 'app/controllers/foreman_patch/api/v2/rounds_controller.rb', line 64

def resource_class
  ForemanPatch::Round
end

#showObject



25
26
# File 'app/controllers/foreman_patch/api/v2/rounds_controller.rb', line 25

def show
end

#statusObject



30
31
# File 'app/controllers/foreman_patch/api/v2/rounds_controller.rb', line 30

def status
end

#updateObject



54
55
56
# File 'app/controllers/foreman_patch/api/v2/rounds_controller.rb', line 54

def update
  process_response @round.update(round_params)
end