From 999e96a85763a755bbd49533680497e0f1330f91 Mon Sep 17 00:00:00 2001 From: huang Date: Mon, 8 Jun 2015 15:45:12 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8F=96=E6=B6=88=E6=8E=89=E6=89=93=E5=8D=B0at?= =?UTF-8?q?tachment?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/models/mailer.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/mailer.rb b/app/models/mailer.rb index b6a2bfa32..204aa109a 100644 --- a/app/models/mailer.rb +++ b/app/models/mailer.rb @@ -166,7 +166,7 @@ class Mailer < ActionMailer::Base @forums = Forum.find_by_sql("select DISTINCT * from forums where creator_id = #{user.id} and (created_at between '#{date_from}' and '#{date_to}') order by created_at desc") @memos = Memo.find_by_sql("select DISTINCT m.* from memos m, forums f where (m.author_id = #{user.id} or (m.forum_id = f.id and f.creator_id = #{user.id})) and (m.created_at between '#{date_from}' and '#{date_to}') order by m.created_at desc") - puts @attachments + has_content = [@issues,@course_messages,@project_messages,@course_news,@project_news, @course_journal_messages,@user_journal_messages,@forums,@memos,@attachments,@bids].any? {|o| !o.empty?} mylogger.debug "Sent activity mail : #{user.mail} - #{has_content}"