dev_course
cxt 6 years ago
parent 1ea04d55dd
commit 32479e4d3a

@ -109,8 +109,8 @@ class GraduationTasksController < ApplicationController
end end
# 排序 # 排序
rorder = params[:order] || "updated_at" rorder = params[:order].blank? ? "updated_at" : params[:order]
b_order = params[:b_order] || "desc" b_order = params[:b_order].blank? ? "desc" : params[:b_order]
if rorder == "created_at" || rorder == "work_score" if rorder == "created_at" || rorder == "work_score"
@work_list = @work_list.order("graduation_works.#{rorder} #{b_order}") @work_list = @work_list.order("graduation_works.#{rorder} #{b_order}")
elsif rorder == "student_id" elsif rorder == "student_id"

Loading…
Cancel
Save