From 3e88d62ba66dff6c0dd626b2a07306545ef0503d Mon Sep 17 00:00:00 2001 From: huang Date: Sat, 4 Jul 2015 14:57:17 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E8=AF=BE=E7=A8=8B=E9=99=84?= =?UTF-8?q?=E4=BB=B6=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 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/mailer.rb b/app/models/mailer.rb index 226ce02bb..5ae9df001 100644 --- a/app/models/mailer.rb +++ b/app/models/mailer.rb @@ -121,7 +121,7 @@ class Mailer < ActionMailer::Base 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("homework_commons.created_at desc") - attachments = courses[i].attachments.where("attachments.created_on between '#{date_from}' and '#{date_to}'").order("attachments.created_on DESC' ") + attachments = courses[i].attachments.where("attachments.created_on between '#{date_from}' and '#{date_to}'") @bids += bids if bids.count > 0 @attachments += attachments if attachments.count > 0 end