Added missing dependent for notes assoc

This commit is contained in:
Dmitriy Zaporozhets 2011-12-18 12:10:20 +02:00
parent 132177c2b7
commit 10df55e11d
3 changed files with 3 additions and 3 deletions

View file

@ -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

View file

@ -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

View file

@ -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,