From 4092077923b77f8e7810ae2c0d45ab1047079861 Mon Sep 17 00:00:00 2001 From: huang Date: Thu, 25 Jun 2015 16:34:02 +0800 Subject: [PATCH] =?UTF-8?q?=E4=B8=8D=E5=90=8C=E8=AF=BE=E7=A8=8B=E9=82=AE?= =?UTF-8?q?=E4=BB=B6=E5=A4=9A=E6=9D=A1=E8=AE=B0=E5=BD=95=E6=8C=89desc?= =?UTF-8?q?=E6=8E=92=E5=BA=8F?= 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 d0ee99421..0d0b82752 100644 --- a/app/models/mailer.rb +++ b/app/models/mailer.rb @@ -124,8 +124,8 @@ class Mailer < ActionMailer::Base 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 + @bids.sort {|a, b| a.created_at <=> b.created_at} end # 项目附件