Class: Api::V2::ForemanDatacenter::RacksController

Inherits:
BaseController
  • Object
show all
Includes:
ForemanDatacenter::Controller::Parameters::Rack
Defined in:
app/controllers/api/v2/foreman_datacenter/racks_controller.rb

Instance Method Summary collapse

Methods inherited from BaseController

#action_permission, #controller_permission, #find_resource, #resource_class, #resource_class_for, #resource_finder, #resource_name, #resource_scope, #scope_for

Instance Method Details

#createObject



39
40
41
42
# File 'app/controllers/api/v2/foreman_datacenter/racks_controller.rb', line 39

def create
  @rack = ::ForemanDatacenter::Rack.new(rack_params)
  process_response @rack.save
end

#destroyObject



55
56
57
# File 'app/controllers/api/v2/foreman_datacenter/racks_controller.rb', line 55

def destroy
  process_response @rack.destroy
end

#indexObject



15
16
17
# File 'app/controllers/api/v2/foreman_datacenter/racks_controller.rb', line 15

def index
  @racks = resource_scope_for_index
end

#showObject



22
23
# File 'app/controllers/api/v2/foreman_datacenter/racks_controller.rb', line 22

def show
end

#updateObject



48
49
50
# File 'app/controllers/api/v2/foreman_datacenter/racks_controller.rb', line 48

def update
  process_response @rack.update(rack_params)
end