Added missing dependent for notes assoc
This commit is contained in:
parent
132177c2b7
commit
10df55e11d
|
@ -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
|
||||
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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,
|
||||
|
|
Loading…
Reference in a new issue