Commit 10df55e11d976a11eb9ff71ff0c0c399d3f01c64
1 parent
132177c2
Exists in
master
and in
4 other branches
Added missing dependent for notes assoc
Showing
3 changed files
with
3 additions
and
3 deletions
Show diff stats
app/models/issue.rb
@@ -2,7 +2,7 @@ class Issue < ActiveRecord::Base | @@ -2,7 +2,7 @@ class Issue < ActiveRecord::Base | ||
2 | belongs_to :project | 2 | belongs_to :project |
3 | belongs_to :author, :class_name => "User" | 3 | belongs_to :author, :class_name => "User" |
4 | belongs_to :assignee, :class_name => "User" | 4 | belongs_to :assignee, :class_name => "User" |
5 | - has_many :notes, :as => :noteable | 5 | + has_many :notes, :as => :noteable, :dependent => :destroy |
6 | 6 | ||
7 | attr_protected :author, :author_id, :project, :project_id | 7 | attr_protected :author, :author_id, :project, :project_id |
8 | 8 |
app/models/merge_request.rb
@@ -2,7 +2,7 @@ class MergeRequest < ActiveRecord::Base | @@ -2,7 +2,7 @@ class MergeRequest < ActiveRecord::Base | ||
2 | belongs_to :project | 2 | belongs_to :project |
3 | belongs_to :author, :class_name => "User" | 3 | belongs_to :author, :class_name => "User" |
4 | belongs_to :assignee, :class_name => "User" | 4 | belongs_to :assignee, :class_name => "User" |
5 | - has_many :notes, :as => :noteable | 5 | + has_many :notes, :as => :noteable, :dependent => :destroy |
6 | 6 | ||
7 | attr_protected :author, :author_id, :project, :project_id | 7 | attr_protected :author, :author_id, :project, :project_id |
8 | 8 |
app/models/snippet.rb
@@ -3,7 +3,7 @@ class Snippet < ActiveRecord::Base | @@ -3,7 +3,7 @@ class Snippet < ActiveRecord::Base | ||
3 | 3 | ||
4 | belongs_to :project | 4 | belongs_to :project |
5 | belongs_to :author, :class_name => "User" | 5 | belongs_to :author, :class_name => "User" |
6 | - has_many :notes, :as => :noteable | 6 | + has_many :notes, :as => :noteable, :dependent => :destroy |
7 | 7 | ||
8 | delegate :name, | 8 | delegate :name, |
9 | :email, | 9 | :email, |