不同课程邮件多条记录按desc排序

This commit is contained in:
huang 2015-06-25 16:34:02 +08:00
parent 3924bdf338
commit 4092077923
1 changed files with 1 additions and 1 deletions

View File

@ -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
# 项目附件