字段名字错误

This commit is contained in:
lizanle 2015-06-26 10:22:30 +08:00
parent a8377f7dcb
commit f32c76c7a2
1 changed files with 1 additions and 1 deletions

View File

@ -330,7 +330,7 @@ class CoursesService
def homework_list params,current_user
course = Course.find(params[:id])
if course.is_public != 0 || current_user.member_of_course?(course)
bids = course.homework_commons.page(1).per(3).order('end_time DESC')
bids = course.homework_commons.page(1).per(3).order('created_at DESC')
bids = bids.like(params[:name]) if params[:name].present?
homeworks = []
bids.each do |bid|