This commit is contained in:
sw 2015-07-04 15:07:00 +08:00
commit 1b4e2b2953
1 changed files with 1 additions and 1 deletions

View File

@ -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