From 2873412d1a120d02530e51bb4d7471b00ea68df5 Mon Sep 17 00:00:00 2001 From: huang Date: Mon, 28 Sep 2015 15:06:23 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E9=82=AE=E4=BB=B6--=E6=AF=8F?= =?UTF-8?q?=E5=A4=A9=E5=8F=91=E9=80=81-=E3=80=8B=E5=86=85=E5=AE=B9?= =?UTF-8?q?=E4=B8=BA=E7=A9=BA=E7=9A=84=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 | 1 + app/views/mailer/send_for_user_activities.html.erb | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/app/models/mailer.rb b/app/models/mailer.rb index b820e6d54..3168a4d4d 100644 --- a/app/models/mailer.rb +++ b/app/models/mailer.rb @@ -247,6 +247,7 @@ class Mailer < ActionMailer::Base has_content = [@issues,@issues_journals,@course_messages,@project_messages,@course_news,@course_news_comments,@project_news,@project_news_comments,@project_attachments, @course_journal_messages,@user_journal_messages,@project_journal_messages,@forums,@memos,@attachments,@bids,@wiki_contents].any? {|o| !o.empty?} + mylogger.debug "Sent activity mail : #{user.mail} - #{has_content}" #有内容才发,没有不发 mail :to => user.mail,:subject => subject if has_content diff --git a/app/views/mailer/send_for_user_activities.html.erb b/app/views/mailer/send_for_user_activities.html.erb index 6fc742c99..3f761fbd4 100644 --- a/app/views/mailer/send_for_user_activities.html.erb +++ b/app/views/mailer/send_for_user_activities.html.erb @@ -7,7 +7,7 @@

<%= l(:label_course_overview)%>

- <% unless @course_news.first.nil? || @course_news_comments.first.nil? %> + <% if !@course_news.first.nil? || !@course_news_comments.first.nil? %>