Project

General

Profile

« Previous | Next » 

Revision c764d9ec

Added by Ohad Levy almost 13 years ago

  • ID c764d9ec74bf2fb9eb9a9b7f4b2cb1f54709ebd8

fixes #1040 - deleting a hostgroup, may delete a configuration template too

View differences:

app/models/hostgroup.rb
accepts_nested_attributes_for :group_parameters, :reject_if => lambda { |a| a[:value].blank? }, :allow_destroy => true
has_many :hosts
before_destroy Ensure_not_used_by.new(:hosts)
has_many :config_templates, :through => :template_combinations, :dependent => :destroy
has_many :config_templates, :through => :template_combinations
has_many :template_combinations
belongs_to :operatingsystem
belongs_to :environment

Also available in: Unified diff