diff --git a/app/controllers/graduation_tasks_controller.rb b/app/controllers/graduation_tasks_controller.rb index 910299fd0..cadac75be 100644 --- a/app/controllers/graduation_tasks_controller.rb +++ b/app/controllers/graduation_tasks_controller.rb @@ -112,7 +112,7 @@ class GraduationTasksController < ApplicationController # 排序 rorder = params[:order].blank? ? "updated_at" : params[:order] b_order = params[:b_order].blank? ? "desc" : params[:b_order] - if rorder == "created_at" || rorder == "work_score" + if rorder == "updated_at" || rorder == "work_score" @work_list = @work_list.order("graduation_works.#{rorder} #{b_order}") elsif rorder == "student_id" @work_list = @work_list.joins(user: :user_extension).order("user_extensions.#{rorder} #{b_order}")