From ffe828d2686442a8546e1740c157beb57c9e420f Mon Sep 17 00:00:00 2001 From: Joachim Filip Ignacy Bartosik Date: Fri, 9 Jul 2010 11:23:45 +0200 Subject: Bug fix - answer was trying to send notifications to non-existing mentors --- app/models/answer.rb | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'app') diff --git a/app/models/answer.rb b/app/models/answer.rb index a6eed13..be3477c 100644 --- a/app/models/answer.rb +++ b/app/models/answer.rb @@ -71,10 +71,11 @@ class Answer < ActiveRecord::Base end protected def notify_new_answer - UserMailer.deliver_new_answer(owner.mentor, self)unless owner.mentor.nil? + UserMailer.deliver_new_answer(owner.mentor, self) unless owner.mentor.nil? end def notify_changed_answer - UserMailer.deliver_changed_answer owner.mentor, self + UserMailer.deliver_changed_answer(owner.mentor, self) unless owner.mentor.nil? end + end -- cgit v1.2.3-65-gdbad