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.
This commit is contained in:
parent
db3d90cbcb
commit
9588a23242
2 changed files with 3 additions and 2 deletions
|
@ -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|
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue