From c87f58bc73954c3a0c7cadfc1dc13b602bf02be2 Mon Sep 17 00:00:00 2001 From: daiao <358551898@qq.com> Date: Thu, 11 Jul 2019 15:57:11 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=9E=E8=AE=AD=E5=9B=9E=E5=A4=8D'?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/discusses_controller.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/controllers/discusses_controller.rb b/app/controllers/discusses_controller.rb index c5cb6814d..3b987be51 100644 --- a/app/controllers/discusses_controller.rb +++ b/app/controllers/discusses_controller.rb @@ -20,9 +20,9 @@ class DiscussesController < ApplicationController @manger = @container.has_manager?(current_user) if @manger @discusses = disscusses.limit(LIMIT).joins("left join games on discusses.challenge_id = games.challenge_id and discusses.user_id = games.user_id") - .select("discusses.*, games.identifier").includes(:praise_treads).offset(offset) + .select("discusses.*, games.identifier").includes(:user, :praise_treads).offset(offset) else - @discusses = disscusses.limit(LIMIT).includes(:praise_treads).offset(offset) + @discusses = disscusses.limit(LIMIT).includes(:user, :praise_treads).offset(offset) end @current_user = current_user