summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2011-12-18 12:10:20 +0200
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2011-12-18 12:10:20 +0200
commit10df55e11d976a11eb9ff71ff0c0c399d3f01c64 (patch)
tree705cd530d18a4861fce182bfb739cad3726f588d /app
parent132177c2b7cf3a241ff76d0154b31c7bea6059fc (diff)
downloadgitlab-ce-10df55e11d976a11eb9ff71ff0c0c399d3f01c64.tar.gz
Added missing dependent for notes assoc
Diffstat (limited to 'app')
-rw-r--r--app/models/issue.rb2
-rw-r--r--app/models/merge_request.rb2
-rw-r--r--app/models/snippet.rb2
3 files changed, 3 insertions, 3 deletions
diff --git a/app/models/issue.rb b/app/models/issue.rb
index b8b432673a4..3da595d91c2 100644
--- a/app/models/issue.rb
+++ b/app/models/issue.rb
@@ -2,7 +2,7 @@ class Issue < ActiveRecord::Base
belongs_to :project
belongs_to :author, :class_name => "User"
belongs_to :assignee, :class_name => "User"
- has_many :notes, :as => :noteable
+ has_many :notes, :as => :noteable, :dependent => :destroy
attr_protected :author, :author_id, :project, :project_id
diff --git a/app/models/merge_request.rb b/app/models/merge_request.rb
index 6f8b0cdfedd..d726d2d046d 100644
--- a/app/models/merge_request.rb
+++ b/app/models/merge_request.rb
@@ -2,7 +2,7 @@ class MergeRequest < ActiveRecord::Base
belongs_to :project
belongs_to :author, :class_name => "User"
belongs_to :assignee, :class_name => "User"
- has_many :notes, :as => :noteable
+ has_many :notes, :as => :noteable, :dependent => :destroy
attr_protected :author, :author_id, :project, :project_id
diff --git a/app/models/snippet.rb b/app/models/snippet.rb
index d849a1d3f61..ae25e8a3bb8 100644
--- a/app/models/snippet.rb
+++ b/app/models/snippet.rb
@@ -3,7 +3,7 @@ class Snippet < ActiveRecord::Base
belongs_to :project
belongs_to :author, :class_name => "User"
- has_many :notes, :as => :noteable
+ has_many :notes, :as => :noteable, :dependent => :destroy
delegate :name,
:email,