Class: ForemanPatch::Api::V2::PlansController

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

Instance Method Summary collapse

Instance Method Details

#createObject



41
42
43
44
# File 'app/controllers/foreman_patch/api/v2/plans_controller.rb', line 41

def create
  @plan = Plan.new(plan_params)
  process_response @plan.save
end

#destroyObject



61
62
63
# File 'app/controllers/foreman_patch/api/v2/plans_controller.rb', line 61

def destroy
  process_response @plan.destroy
end

#indexObject



17
18
19
# File 'app/controllers/foreman_patch/api/v2/plans_controller.rb', line 17

def index
  @plans = resource_scope_for_index
end

#iterateObject



55
56
57
# File 'app/controllers/foreman_patch/api/v2/plans_controller.rb', line 55

def iterate
  process_response @plan.iterate
end

#resource_classObject



65
66
67
# File 'app/controllers/foreman_patch/api/v2/plans_controller.rb', line 65

def resource_class
  ForemanPatch::Plan
end

#showObject



23
24
# File 'app/controllers/foreman_patch/api/v2/plans_controller.rb', line 23

def show
end

#updateObject



49
50
51
# File 'app/controllers/foreman_patch/api/v2/plans_controller.rb', line 49

def update
  process_response @plan.update(plan_params)
end