Revision 50541c05
Added by Ohad Levy over 12 years ago
- ID 50541c05d7a044b74fb5bd003714236557350de2
app/models/hostgroup.rb | ||
---|---|---|
has_many :config_templates, :through => :template_combinations
|
||
has_many :template_combinations
|
||
before_save :serialize_vm_attributes
|
||
before_save :remove_duplicated_nested_class
|
||
after_find :deserialize_vm_attributes
|
||
|
||
alias_attribute :os, :operatingsystem
|
||
... | ... | |
end
|
||
end
|
||
|
||
def remove_duplicated_nested_class
|
||
self.puppetclasses -= ancestors.map(&:puppetclasses).flatten
|
||
end
|
||
|
||
end
|
Also available in: Unified diff
fixes #1191 - removes duplicated classes when nesting hostgroups