diff options
3 files changed, 7 insertions, 7 deletions
diff --git a/sonar-server/src/main/webapp/WEB-INF/app/models/dashboard.rb b/sonar-server/src/main/webapp/WEB-INF/app/models/dashboard.rb index 71543d6d9ba..2fc8b509b05 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/models/dashboard.rb +++ b/sonar-server/src/main/webapp/WEB-INF/app/models/dashboard.rb @@ -24,7 +24,7 @@ class Dashboard < ActiveRecord::Base belongs_to :user has_many :widgets, :include => 'properties', :dependent => :delete_all - has_many :active_dashboards, :dependent => :delete_all + has_many :active_dashboards, :dependent => :destroy validates_length_of :name, :within => 1..256 validates_length_of :description, :maximum => 1000, :allow_blank => true, :allow_nil => true diff --git a/sonar-server/src/main/webapp/WEB-INF/app/models/filter.rb b/sonar-server/src/main/webapp/WEB-INF/app/models/filter.rb index e4462407d9b..3b472fe78c9 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/models/filter.rb +++ b/sonar-server/src/main/webapp/WEB-INF/app/models/filter.rb @@ -27,9 +27,9 @@ class Filter < ActiveRecord::Base belongs_to :user belongs_to :resource, :class_name => 'Project', :foreign_key => 'resource_id' - has_many :columns, :class_name => 'FilterColumn', :dependent => :delete_all, :validate => true, :order => 'order_index' - has_many :criteria, :class_name => 'Criterion', :dependent => :delete_all, :validate => true - has_many :active_filters, :dependent => :delete_all + has_many :columns, :class_name => 'FilterColumn', :dependent => :destroy, :validate => true, :order => 'order_index' + has_many :criteria, :class_name => 'Criterion', :dependent => :destroy, :validate => true + has_many :active_filters, :dependent => :destroy validates_length_of :name, :within => 1..100 validates_uniqueness_of :name, :scope => :user_id, :if => Proc.new { |filter| filter.user_id } diff --git a/sonar-server/src/main/webapp/WEB-INF/app/models/user.rb b/sonar-server/src/main/webapp/WEB-INF/app/models/user.rb index f7477586cff..7635670b6b0 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/models/user.rb +++ b/sonar-server/src/main/webapp/WEB-INF/app/models/user.rb @@ -27,10 +27,10 @@ class User < ActiveRecord::Base has_many :user_roles, :dependent => :delete_all has_many :properties, :foreign_key => 'user_id', :dependent => :delete_all has_many :active_filters, :include => 'filter', :order => 'order_index' - has_many :filters, :dependent => :delete_all + has_many :filters, :dependent => :destroy - has_many :active_dashboards, :dependent => :delete_all, :order => 'order_index' - has_many :dashboards, :dependent => :delete_all + has_many :active_dashboards, :dependent => :destroy, :order => 'order_index' + has_many :dashboards, :dependent => :destroy include Authentication include Authentication::ByPassword |