Project

General

Profile

Bug #2246 ยป 0001-fixes-2246-deleting-an-environment-also-deletes-asso.patch

backported patch for 1.1 - Mikael Fridh, 05/15/2013 06:43 AM

View differences:

app/models/environment.rb
validates_presence_of :name
validates_uniqueness_of :name
validates_format_of :name, :with => /^[\w\d]+$/, :message => "is alphanumeric and cannot contain spaces"
has_many :config_templates, :through => :template_combinations, :dependent => :destroy
has_many :template_combinations
has_many :config_templates, :through => :template_combinations
has_many :template_combinations, :dependent => :destroy
before_destroy EnsureNotUsedBy.new(:hosts)
    (1-1/1)