Class: ForemanPatch::Api::V2::RoundsController
- Inherits:
-
BaseController
- Object
- Api::V2::BaseController
- BaseController
- ForemanPatch::Api::V2::RoundsController
- Defined in:
- app/controllers/foreman_patch/api/v2/rounds_controller.rb
Instance Method Summary collapse
- #create ⇒ Object
- #destroy ⇒ Object
- #index ⇒ Object
- #resource_class ⇒ Object
- #show ⇒ Object
- #status ⇒ Object
- #update ⇒ Object
Instance Method Details
#create ⇒ Object
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 |
#destroy ⇒ Object
60 61 62 |
# File 'app/controllers/foreman_patch/api/v2/rounds_controller.rb', line 60 def destroy process_response @round.destroy end |
#index ⇒ Object
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_class ⇒ Object
64 65 66 |
# File 'app/controllers/foreman_patch/api/v2/rounds_controller.rb', line 64 def resource_class ForemanPatch::Round end |
#show ⇒ Object
25 26 |
# File 'app/controllers/foreman_patch/api/v2/rounds_controller.rb', line 25 def show end |
#status ⇒ Object
30 31 |
# File 'app/controllers/foreman_patch/api/v2/rounds_controller.rb', line 30 def status end |
#update ⇒ Object
54 55 56 |
# File 'app/controllers/foreman_patch/api/v2/rounds_controller.rb', line 54 def update process_response @round.update(round_params) end |