diff options
author | Robb Kidd <robb@thekidds.org> | 2012-10-13 14:37:36 -0400 |
---|---|---|
committer | Robb Kidd <robb@thekidds.org> | 2012-10-13 14:37:36 -0400 |
commit | 9588a232428d7045fb3e86ce36a81437a854b160 (patch) | |
tree | dda2ec3591fbaa021b7697046de6b5e9023679e1 /app/observers | |
parent | db3d90cbcb41c5b9a62998b185c90c10f9d03968 (diff) | |
download | gitlab-ce-9588a232428d7045fb3e86ce36a81437a854b160.tar.gz |
Fix notification for notes on a wall.
The fact that Notes on Walls have a noteable_type value of "nil" got
lost in the refactoring of the observer.
Diffstat (limited to 'app/observers')
-rw-r--r-- | app/observers/note_observer.rb | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/app/observers/note_observer.rb b/app/observers/note_observer.rb index 3d51b9c2e2e..d328338a706 100644 --- a/app/observers/note_observer.rb +++ b/app/observers/note_observer.rb @@ -16,7 +16,8 @@ class NoteObserver < ActiveRecord::Observer protected def notify_team_of_new_note(note) - notify_method = 'note_' + note.noteable_type.underscore + '_email' + note_is_on = note.noteable_type || 'Wall' + notify_method = 'note_' + note_is_on.underscore + '_email' if Notify.respond_to? notify_method team_without_note_author(note).map do |u| |