Revision 84579c3a
Added by David Davis over 8 years ago
app/models/hostgroup.rb | ||
---|---|---|
end
|
||
|
||
def inherited_lookup_value(key)
|
||
ancestors.reverse.each do |hg|
|
||
ancestors.reverse_each do |hg|
|
||
if (v = LookupValue.where(:lookup_key_id => key.id, :id => hg.lookup_values).first)
|
||
return v.value, hg.to_label
|
||
end
|
||
... | ... | |
private
|
||
|
||
def nested_root_pw
|
||
Hostgroup.sort_by_ancestry(ancestors).reverse.each do |a|
|
||
Hostgroup.sort_by_ancestry(ancestors).reverse_each do |a|
|
||
return a.root_pass unless a.root_pass.blank?
|
||
end if ancestry.present?
|
||
nil
|
Also available in: Unified diff
Fixes #12911 - Turning on 0.35.1 cops