From f03f68e5fd1fb680bc989f093fbe0841b41d586a Mon Sep 17 00:00:00 2001 From: p31729568 Date: Tue, 20 Aug 2019 17:23:53 +0800 Subject: [PATCH] fix --- app/controllers/colleges_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/colleges_controller.rb b/app/controllers/colleges_controller.rb index ebf33df3..85a09d0b 100644 --- a/app/controllers/colleges_controller.rb +++ b/app/controllers/colleges_controller.rb @@ -160,7 +160,7 @@ class CollegesController < ApplicationController end def student_hot_evaluations - games = Game.unscoped().joins(:myshixun).joins('join shixun_tag_repertoires str on str.shixun_id = myshixuns.shixun_id') + games = Game.joins(:myshixun).joins('join shixun_tag_repertoires str on str.shixun_id = myshixuns.shixun_id') games = games.joins('join tag_repertoires tr on tr.id = str.tag_repertoire_id') games = games.joins("join user_extensions ue on ue.user_id = myshixuns.user_id and ue.school_id = #{@school.id}") evaluate_count_map = games.group('tr.name').reorder('sum_games_evaluate_count desc').limit(10).sum('games.evaluate_count')