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 | 2 | belongs_to :project |
| 3 | 3 | belongs_to :author, :class_name => "User" |
| 4 | 4 | belongs_to :assignee, :class_name => "User" |
| 5 | - has_many :notes, :as => :noteable | |
| 5 | + has_many :notes, :as => :noteable, :dependent => :destroy | |
| 6 | 6 | |
| 7 | 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 | 2 | belongs_to :project |
| 3 | 3 | belongs_to :author, :class_name => "User" |
| 4 | 4 | belongs_to :assignee, :class_name => "User" |
| 5 | - has_many :notes, :as => :noteable | |
| 5 | + has_many :notes, :as => :noteable, :dependent => :destroy | |
| 6 | 6 | |
| 7 | 7 | attr_protected :author, :author_id, :project, :project_id |
| 8 | 8 | ... | ... |
app/models/snippet.rb