Class: Api::V2::ForemanDatacenter::RackGroupsController
- Inherits:
-
BaseController
- Object
- V2::BaseController
- BaseController
- Api::V2::ForemanDatacenter::RackGroupsController
show all
- Includes:
- ForemanDatacenter::Controller::Parameters::RackGroup
- Defined in:
- app/controllers/api/v2/foreman_datacenter/rack_groups_controller.rb
Instance Method Summary
collapse
#action_permission, #controller_permission, #find_resource, #resource_class, #resource_class_for, #resource_finder, #resource_name, #resource_scope, #scope_for
Instance Method Details
#create ⇒ Object
35
36
37
38
|
# File 'app/controllers/api/v2/foreman_datacenter/rack_groups_controller.rb', line 35
def create
@rack_group = ::ForemanDatacenter::RackGroup.new(rack_group_params)
process_response @rack_group.save
end
|
#destroy ⇒ Object
51
52
53
|
# File 'app/controllers/api/v2/foreman_datacenter/rack_groups_controller.rb', line 51
def destroy
process_response @rack_group.destroy
end
|
#index ⇒ Object
15
16
17
|
# File 'app/controllers/api/v2/foreman_datacenter/rack_groups_controller.rb', line 15
def index
@rack_groups = resource_scope_for_index
end
|
#show ⇒ Object
22
23
|
# File 'app/controllers/api/v2/foreman_datacenter/rack_groups_controller.rb', line 22
def show
end
|
#update ⇒ Object
44
45
46
|
# File 'app/controllers/api/v2/foreman_datacenter/rack_groups_controller.rb', line 44
def update
process_response @rack_group.update(rack_group_params)
end
|