Class: ForemanPuppet::Api::V2::ConfigGroupsController
- Inherits:
-
PuppetBaseController
- Object
- Api::V2::BaseController
- PuppetBaseController
- ForemanPuppet::Api::V2::ConfigGroupsController
- Includes:
- Parameters::ConfigGroup
- Defined in:
- app/controllers/foreman_puppet/api/v2/config_groups_controller.rb
Instance Method Summary collapse
- #create ⇒ Object
- #destroy ⇒ Object
- #index ⇒ Object
- #resource_class ⇒ Object
- #show ⇒ Object
- #update ⇒ Object
Methods included from Parameters::ConfigGroup
Instance Method Details
#create ⇒ Object
39 40 41 42 |
# File 'app/controllers/foreman_puppet/api/v2/config_groups_controller.rb', line 39 def create @config_group = ConfigGroup.new(config_group_params) process_response @config_group.save end |
#destroy ⇒ Object
55 56 57 |
# File 'app/controllers/foreman_puppet/api/v2/config_groups_controller.rb', line 55 def destroy process_response @config_group.destroy end |
#index ⇒ Object
19 20 21 |
# File 'app/controllers/foreman_puppet/api/v2/config_groups_controller.rb', line 19 def index @config_groups = resource_scope_for_index end |
#resource_class ⇒ Object
59 60 61 |
# File 'app/controllers/foreman_puppet/api/v2/config_groups_controller.rb', line 59 def resource_class ForemanPuppet::ConfigGroup end |
#show ⇒ Object
26 27 |
# File 'app/controllers/foreman_puppet/api/v2/config_groups_controller.rb', line 26 def show end |
#update ⇒ Object
48 49 50 |
# File 'app/controllers/foreman_puppet/api/v2/config_groups_controller.rb', line 48 def update process_response @config_group.update(config_group_params) end |