Class: ForemanPuppet::Api::V2::EnvironmentsController
- Inherits:
-
BaseController
- Object
- Api::V2::BaseController
- BaseController
- ForemanPuppet::Api::V2::EnvironmentsController
- Defined in:
- app/controllers/foreman_puppet/api/v2/environments_controller.rb
Instance Method Summary collapse
Methods included from Parameters::Environment
Methods included from ImportPuppetclassesCommonController
Instance Method Details
#create ⇒ Object
45 46 47 48 |
# File 'app/controllers/foreman_puppet/api/v2/environments_controller.rb', line 45 def create @environment = Environment.new(environment_params) process_response @environment.save end |
#destroy ⇒ Object
61 62 63 |
# File 'app/controllers/foreman_puppet/api/v2/environments_controller.rb', line 61 def destroy process_response @environment.destroy end |
#index ⇒ Object
25 26 27 |
# File 'app/controllers/foreman_puppet/api/v2/environments_controller.rb', line 25 def index @environments = resource_scope_for_index end |
#show ⇒ Object
32 33 |
# File 'app/controllers/foreman_puppet/api/v2/environments_controller.rb', line 32 def show end |
#update ⇒ Object
54 55 56 |
# File 'app/controllers/foreman_puppet/api/v2/environments_controller.rb', line 54 def update process_response @environment.update(environment_params) end |