Module: ForemanPuppet::Extensions::ApiV2HostsController::PatchMethods
- Defined in:
- app/controllers/concerns/foreman_puppet/extensions/api_v2_hosts_controller.rb
Instance Method Summary collapse
Instance Method Details
#allowed_nested_id ⇒ Object
40 41 42 43 44 |
# File 'app/controllers/concerns/foreman_puppet/extensions/api_v2_hosts_controller.rb', line 40 def allowed_nested_id ids = super ids << 'environment_id' if ForemanPuppet.extracted_from_core? ids.uniq end |
#resource_name(*attrs) ⇒ Object
34 35 36 37 38 |
# File 'app/controllers/concerns/foreman_puppet/extensions/api_v2_hosts_controller.rb', line 34 def resource_name(*attrs) return 'foreman_puppet/environment' if attrs.first.is_a?(String) && attrs.first.start_with?('environment') super(*attrs) end |