Class: ForemanPuppet::ConfigGroupsController
- Inherits:
-
ApplicationController
- Object
- ApplicationController
- ForemanPuppet::ConfigGroupsController
- Includes:
- Foreman::Controller::AutoCompleteSearch, Parameters::ConfigGroup
- Defined in:
- app/controllers/foreman_puppet/config_groups_controller.rb
Instance Method Summary collapse
- #create ⇒ Object
- #destroy ⇒ Object
- #edit ⇒ Object
- #index ⇒ Object
- #new ⇒ Object
- #resource_class ⇒ Object
- #update ⇒ Object
Methods included from Parameters::ConfigGroup
Instance Method Details
#create ⇒ Object
21 22 23 24 25 26 27 28 |
# File 'app/controllers/foreman_puppet/config_groups_controller.rb', line 21 def create @config_group = ForemanPuppet::ConfigGroup.new(config_group_params) if @config_group.save process_success else process_error end end |
#destroy ⇒ Object
38 39 40 41 42 43 44 |
# File 'app/controllers/foreman_puppet/config_groups_controller.rb', line 38 def destroy if @config_group.destroy process_success else process_error end end |
#edit ⇒ Object
18 19 |
# File 'app/controllers/foreman_puppet/config_groups_controller.rb', line 18 def edit end |
#index ⇒ Object
10 11 12 |
# File 'app/controllers/foreman_puppet/config_groups_controller.rb', line 10 def index @config_groups = resource_base_search_and_page end |
#new ⇒ Object
14 15 16 |
# File 'app/controllers/foreman_puppet/config_groups_controller.rb', line 14 def new @config_group = ForemanPuppet::ConfigGroup.new end |
#resource_class ⇒ Object
46 47 48 |
# File 'app/controllers/foreman_puppet/config_groups_controller.rb', line 46 def resource_class model_of_controller end |
#update ⇒ Object
30 31 32 33 34 35 36 |
# File 'app/controllers/foreman_puppet/config_groups_controller.rb', line 30 def update if @config_group.update(config_group_params) process_success else process_error end end |