From becbf039bacd87644a6fb0245871325a53771fe0 Mon Sep 17 00:00:00 2001 From: damau Date: Tue, 12 Feb 2013 13:49:04 +0000 Subject: [PATCH] added interval statement for notifications --- app/models/notice_observer.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/models/notice_observer.rb b/app/models/notice_observer.rb index be29e91..80d57fe 100644 --- a/app/models/notice_observer.rb +++ b/app/models/notice_observer.rb @@ -3,11 +3,11 @@ class NoticeObserver < Mongoid::Observer def after_create notice # if the app has a notification service, fire it off - if notice.app.notification_service_configured? + if notice.app.notification_service_configured? and notice.should_notify? notice.app.notification_service.create_notification(notice.problem) end - Mailer.err_notification(notice).deliver if notice.should_notify? + Mailer.err_notification(notice).deliver if notice.should_email? end end -- libgit2 0.21.2