This commit is contained in:
yanxd 2014-06-05 17:32:26 +08:00
parent c9e6b6c9b9
commit 0d8b06ec87
1 changed files with 1 additions and 1 deletions

View File

@ -410,7 +410,7 @@ class BidsController < ApplicationController
@homework = HomeworkAttach.new
#@homework_list = @bid.homeworks
#增加作业按评分排序,
@homework_list = @bid.homeworks.joins(:rate_averages, :user, :attachments).order('seems_rateable_cached_ratings.avg DESC')
@homework_list = @bid.homeworks.eager_load(:rate_averages, :user, :attachments).order('seems_rateable_cached_ratings.avg DESC')
if params[:student_id].present?
@temp = []
@homework_list.each do |pro|