From 3e37a54a0f5bcb4806d2fe74fe1a26fa92a7de54 Mon Sep 17 00:00:00 2001 From: z9hang Date: Thu, 19 Jun 2014 14:44:58 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E7=AB=9E=E8=B5=9B=E5=A4=84?= =?UTF-8?q?=E4=B8=8D=E8=83=BD=E7=95=99=E8=A8=80=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/models/mailer.rb | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/app/models/mailer.rb b/app/models/mailer.rb index e954f03c8..81ef95c85 100644 --- a/app/models/mailer.rb +++ b/app/models/mailer.rb @@ -75,7 +75,12 @@ class Mailer < ActionMailer::Base return -1 end mail :to => journals_for_message.jour.author.mail, :subject => @title - else + elsif journals_for_message.jour.class.to_s.to_sym == :Contest + if !journals_for_message.jour.author.notify_about? journals_for_message + return -1 + end + mail :to => journals_for_message.jour.author.mail, :subject => @title + else mail :to => @mail.mail, :subject => @title end