From 02805fd145cb4d31f1245dba0b445b3ae1d1c549 Mon Sep 17 00:00:00 2001 From: huang Date: Sat, 4 Jul 2015 12:12:44 +0800 Subject: [PATCH] =?UTF-8?q?1=E3=80=81=E4=BF=AE=E6=94=B9=E9=82=AE=E4=BB=B6?= =?UTF-8?q?=E6=98=BE=E7=A4=BA=E6=A0=B7=E5=BC=8F=E5=8F=8A=E5=9B=BD=E9=99=85?= =?UTF-8?q?=E5=8C=96=202=E3=80=81=E5=8F=91=E5=B8=83=E4=BD=9C=E4=B8=9A?= =?UTF-8?q?=E4=BB=A3=E7=A0=81=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/models/mailer.rb | 4 ++-- app/views/mailer/send_for_user_activities.html.erb | 6 +++--- config/locales/commons/zh.yml | 2 +- config/locales/zh.yml | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/app/models/mailer.rb b/app/models/mailer.rb index 7aa793d82..226ce02bb 100644 --- a/app/models/mailer.rb +++ b/app/models/mailer.rb @@ -120,8 +120,8 @@ class Mailer < ActionMailer::Base count = courses.count count = count - 1 for i in 0..count do - bids = courses[i].homework_commons.where("homework_commons.created_at between '#{date_from}' and '#{date_to}'").order(" '#{courses[i].id}', homework_commons.created_at desc") - attachments = courses[i].attachments.where("attachments.created_on between '#{date_from}' and '#{date_to}'").order(" '#{courses[i].id}',attachments.created_on DESC' ") + bids = courses[i].homework_commons.where("homework_commons.created_at between '#{date_from}' and '#{date_to}'").order("homework_commons.created_at desc") + attachments = courses[i].attachments.where("attachments.created_on between '#{date_from}' and '#{date_to}'").order("attachments.created_on DESC' ") @bids += bids if bids.count > 0 @attachments += attachments if attachments.count > 0 end diff --git a/app/views/mailer/send_for_user_activities.html.erb b/app/views/mailer/send_for_user_activities.html.erb index 22eb23bf7..264a420cb 100644 --- a/app/views/mailer/send_for_user_activities.html.erb +++ b/app/views/mailer/send_for_user_activities.html.erb @@ -5,7 +5,7 @@ <% if @attachments.first || @course_news.first || @course_news_comments.first || @bids.first || @course_journal_messages.first|| @course_messages.first || @attachments.first %>
-

<%= l(:label_course_overview)%>

+

<%= l(:label_course_overview)%>

<% unless @course_news.first.nil? || @course_news_comments.first.nil? %>