修改课程附件问题

This commit is contained in:
huang 2015-07-04 14:57:17 +08:00
parent 6f0cb975fd
commit 3e88d62ba6
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