不同课程邮件多条记录按desc排序
This commit is contained in:
parent
3924bdf338
commit
4092077923
|
@ -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
|
||||
|
||||
# 项目附件
|
||||
|
|
Loading…
Reference in New Issue