Commit db7e0bf88d0d77b187a4dcf58e49d252be554568

Authored by Dmitriy Zaporozhets
2 parents dfc5adfc eededdd4

Merge pull request #2215 from jojosch/fix-notify-notes

fix notify_team on wall
Showing 1 changed file with 1 additions and 1 deletions   Show diff stats
app/observers/note_observer.rb
... ... @@ -21,7 +21,7 @@ class NoteObserver < ActiveRecord::Observer
21 21 # Notifies the whole team except the author of note
22 22 def notify_team(note)
23 23 # Note: wall posts are not "attached" to anything, so fall back to "Wall"
24   - noteable_type = note.noteable_type || "Wall"
  24 + noteable_type = note.noteable_type.presence || "Wall"
25 25 notify_method = "note_#{noteable_type.underscore}_email".to_sym
26 26  
27 27 if Notify.respond_to? notify_method
... ...