fixed denotify

This commit is contained in:
nilsding 2014-12-14 15:48:10 +01:00
parent cf78d4758a
commit 519931ee4f
1 changed files with 2 additions and 1 deletions

View File

@ -22,7 +22,8 @@ class Notification < ActiveRecord::Base
notif_type = target.notification_type notif_type = target.notification_type
return nil unless notif_type return nil unless notif_type
notif_type.find_by(recipient: recipient, target: target).destroy notif = notif_type.find_by(recipient: recipient, target: target)
notif.destroy unless notif.nil?
end end
private private