From ef5da1ea0ee164dd20559583be61b2982e5f8971 Mon Sep 17 00:00:00 2001 From: cxt <853663049@qq.com> Date: Thu, 11 Jul 2019 11:07:36 +0800 Subject: [PATCH] =?UTF-8?q?=E6=AF=95=E8=AE=BE=E4=BD=9C=E5=93=81=E5=88=97?= =?UTF-8?q?=E8=A1=A8=E7=9A=84=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/graduation_tasks_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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}")