diff options
author | James Lopez <james@jameslopez.es> | 2016-07-01 15:34:10 +0200 |
---|---|---|
committer | James Lopez <james@jameslopez.es> | 2016-07-01 15:34:10 +0200 |
commit | f29c30475e621dedae24791ae9b144b6bef2f80a (patch) | |
tree | 3850dee7b3703d2e0046015ec84ed700379b0124 /app/models/note.rb | |
parent | d6d0a35598c6fefd31dcc6b43bc2698792788faa (diff) | |
download | gitlab-ce-f29c30475e621dedae24791ae9b144b6bef2f80a.tar.gz |
use has_many relationship with events
Diffstat (limited to 'app/models/note.rb')
-rw-r--r-- | app/models/note.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/app/models/note.rb b/app/models/note.rb index ed26fb2d88a..c2bb117eb03 100644 --- a/app/models/note.rb +++ b/app/models/note.rb @@ -5,7 +5,6 @@ class Note < ActiveRecord::Base include Mentionable include Awardable include Importable - include Eventable # Attribute containing rendered and redacted Markdown as generated by # Banzai::ObjectRenderer. @@ -22,6 +21,7 @@ class Note < ActiveRecord::Base belongs_to :updated_by, class_name: "User" has_many :todos, dependent: :destroy + has_many :events, as: :target, dependent: :destroy delegate :gfm_reference, :local_reference, to: :noteable delegate :name, to: :project, prefix: true |