Module: ForemanChef::Concerns::HostgroupExtensions
- Extended by:
- ActiveSupport::Concern
- Defined in:
- app/models/foreman_chef/concerns/hostgroup_extensions.rb
Instance Method Summary collapse
- #chef_environment ⇒ Object
- #chef_proxy ⇒ Object
- #inherited_chef_environment_id ⇒ Object
- #inherited_chef_proxy_id ⇒ Object
Instance Method Details
#chef_environment ⇒ Object
22 23 24 25 26 27 28 |
# File 'app/models/foreman_chef/concerns/hostgroup_extensions.rb', line 22 def chef_environment if ancestry.present? ::ForemanChef::Environment.find_by_id(inherited_chef_environment_id) else super end end |
#chef_proxy ⇒ Object
14 15 16 17 18 19 20 |
# File 'app/models/foreman_chef/concerns/hostgroup_extensions.rb', line 14 def chef_proxy if ancestry.present? SmartProxy.with_features('Chef').find_by_id(inherited_chef_proxy_id) else super end end |
#inherited_chef_environment_id ⇒ Object
10 11 12 |
# File 'app/models/foreman_chef/concerns/hostgroup_extensions.rb', line 10 def inherited_chef_environment_id read_attribute(:chef_environment_id) || nested(:chef_environment_id) end |
#inherited_chef_proxy_id ⇒ Object
6 7 8 |
# File 'app/models/foreman_chef/concerns/hostgroup_extensions.rb', line 6 def inherited_chef_proxy_id read_attribute(:chef_proxy_id) || nested(:chef_proxy_id) end |