Class: ForemanPatch::WindowsController
- Inherits:
-
ApplicationController
- Object
- ApplicationController
- ForemanPatch::WindowsController
- Defined in:
- app/controllers/foreman_patch/windows_controller.rb
Instance Method Summary collapse
Instance Method Details
#create ⇒ Object
14 15 16 17 18 19 20 21 |
# File 'app/controllers/foreman_patch/windows_controller.rb', line 14 def create @window = Window.new(window_params) if @window.save process_success object: @window else process_error object: @window end end |
#destroy ⇒ Object
34 35 36 37 38 39 40 |
# File 'app/controllers/foreman_patch/windows_controller.rb', line 34 def destroy if @window.destroy process_success object: @window else process_error object: @window end end |
#new ⇒ Object
10 11 12 |
# File 'app/controllers/foreman_patch/windows_controller.rb', line 10 def new @window = Window.new end |
#resource_class ⇒ Object
42 43 44 |
# File 'app/controllers/foreman_patch/windows_controller.rb', line 42 def resource_class ForemanPatch::Window end |
#show ⇒ Object
23 24 25 26 27 28 29 30 31 32 |
# File 'app/controllers/foreman_patch/windows_controller.rb', line 23 def show @cycle = @window.cycle @auto_refresh = @window.task.try(:pending?) respond_to do |format| format.json format.html end end |