From a496de41ee2dca70d495de8b45d9c8e8284fcb4f Mon Sep 17 00:00:00 2001 From: cxt <853663049@qq.com> Date: Mon, 8 Jul 2019 11:41:10 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/student_work_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/student_work_controller.rb b/app/controllers/student_work_controller.rb index 65be029c..01299409 100644 --- a/app/controllers/student_work_controller.rb +++ b/app/controllers/student_work_controller.rb @@ -88,7 +88,7 @@ class StudentWorkController < ApplicationController # 当前用户评测最大次数 @user_evaluate_count = 0 if myshixun.user_id == @work.user.id - @user_evaluate_count = @myshixun.games.pluck(:evaluate_count).sum.to_i + @user_evaluate_count = @myshixun.games.sum(:evaluate_count).to_i end unless params[:pdf]