Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorRobb Kidd <robb@thekidds.org>2012-10-13 22:37:36 +0400
committerRobb Kidd <robb@thekidds.org>2012-10-13 22:37:36 +0400
commit9588a232428d7045fb3e86ce36a81437a854b160 (patch)
treedda2ec3591fbaa021b7697046de6b5e9023679e1 /app
parentdb3d90cbcb41c5b9a62998b185c90c10f9d03968 (diff)
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')
-rw-r--r--app/observers/note_observer.rb3
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|