diff --git a/app/models/mailer.rb b/app/models/mailer.rb index 226ce02bb..5ae9df001 100644 --- a/app/models/mailer.rb +++ b/app/models/mailer.rb @@ -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