Project

General

Profile

« Previous | Next » 

Revision af925318

Added by Tomáš Strachota about 11 years ago

  • ID af92531881ea038d792e48d6883082c66a51660a

fixes #2246 deleting an environment also deletes associated templates

View differences:

app/models/environment.rb
validates_presence_of :name
validates_uniqueness_of :name
validates_format_of :name, :with => /^[\w\d]+$/, :message => N_("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
# with proc support, default_scope can no longer be chained
# include all default scoping here

Also available in: Unified diff