Class: ForemanPatch::WindowPlansController
- Inherits:
-
ApplicationController
- Object
- ApplicationController
- ForemanPatch::WindowPlansController
- Defined in:
- app/controllers/foreman_patch/window_plans_controller.rb
Instance Method Summary collapse
- #create ⇒ Object
- #destroy ⇒ Object
- #edit ⇒ Object
- #new ⇒ Object
- #resource_class ⇒ Object
- #update ⇒ Object
Instance Method Details
#create ⇒ Object
12 13 14 |
# File 'app/controllers/foreman_patch/window_plans_controller.rb', line 12 def create @window_plan = WindowPlan.new(window_plan_params) end |
#destroy ⇒ Object
28 29 30 31 32 33 34 |
# File 'app/controllers/foreman_patch/window_plans_controller.rb', line 28 def destroy if @window_plan.destroy process_success success_hash else process_error end end |
#edit ⇒ Object
16 17 18 |
# File 'app/controllers/foreman_patch/window_plans_controller.rb', line 16 def edit @plan = @window_plan.plan end |
#new ⇒ Object
8 9 10 |
# File 'app/controllers/foreman_patch/window_plans_controller.rb', line 8 def new @window_plan = WindowPlan.new end |
#resource_class ⇒ Object
36 37 38 |
# File 'app/controllers/foreman_patch/window_plans_controller.rb', line 36 def resource_class ForemanPatch::WindowPlan end |
#update ⇒ Object
20 21 22 23 24 25 26 |
# File 'app/controllers/foreman_patch/window_plans_controller.rb', line 20 def update if @window_plan.update(window_plan_params) process_success success_hash else process_error end end |