From c8bfb0b4c1a92f572b601eb68ee2c10001a954e8 Mon Sep 17 00:00:00 2001 From: jingquan huang Date: Fri, 28 Jun 2019 14:14:23 +0800 Subject: [PATCH] .. --- app/controllers/challenges_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/challenges_controller.rb b/app/controllers/challenges_controller.rb index 5503dfe63..b821929d6 100644 --- a/app/controllers/challenges_controller.rb +++ b/app/controllers/challenges_controller.rb @@ -150,7 +150,7 @@ class ChallengesController < ApplicationController uid_logger("identifier: #{params}") # 通过调试发现 这里includes(:games)性能会慢10倍 # @challenges = @shixun.challenges.fields_for_list - @challenges = Challenge.fields_for_list.left_outer_joins(:games).where("challenges.shixun_id" => @shixun.id) + @challenges = Challenge.fields_for_list.where(shixun_id: @shixun.id) # @challenges = Challenge.includes(:games).where("games.user_id" => 12).where(shixun_id: @shixun.id)