Class: ForemanPatch::PlansController
- Inherits:
-
ApplicationController
- Object
- ApplicationController
- ForemanPatch::PlansController
- Defined in:
- app/controllers/foreman_patch/plans_controller.rb
Instance Method Summary collapse
- #create ⇒ Object
- #destroy ⇒ Object
- #edit ⇒ Object
- #index ⇒ Object
- #iterate ⇒ Object
- #new ⇒ Object
- #resource_class ⇒ Object
- #show ⇒ Object
- #update ⇒ Object
Instance Method Details
#create ⇒ Object
14 15 16 |
# File 'app/controllers/foreman_patch/plans_controller.rb', line 14 def create @plan = Plan.new(plan_params) end |
#destroy ⇒ Object
36 37 38 39 40 41 42 |
# File 'app/controllers/foreman_patch/plans_controller.rb', line 36 def destroy if @plan.destroy process_success success_hash else process_error end end |
#edit ⇒ Object
21 22 |
# File 'app/controllers/foreman_patch/plans_controller.rb', line 21 def edit end |
#index ⇒ Object
6 7 8 |
# File 'app/controllers/foreman_patch/plans_controller.rb', line 6 def index @plans = resource_base_search_and_page end |
#iterate ⇒ Object
24 25 26 |
# File 'app/controllers/foreman_patch/plans_controller.rb', line 24 def iterate @plan.iterate end |
#new ⇒ Object
10 11 12 |
# File 'app/controllers/foreman_patch/plans_controller.rb', line 10 def new @plan = Plan.new end |
#resource_class ⇒ Object
44 45 46 |
# File 'app/controllers/foreman_patch/plans_controller.rb', line 44 def resource_class ForemanPatch::Plan end |
#show ⇒ Object
18 19 |
# File 'app/controllers/foreman_patch/plans_controller.rb', line 18 def show end |
#update ⇒ Object
28 29 30 31 32 33 34 |
# File 'app/controllers/foreman_patch/plans_controller.rb', line 28 def update if @plan.update(plan_params) process_success success_hash else process_error end end |