diff --git a/app/controllers/discusses_controller.rb b/app/controllers/discusses_controller.rb index c34b76a8a..c5cb6814d 100644 --- a/app/controllers/discusses_controller.rb +++ b/app/controllers/discusses_controller.rb @@ -20,10 +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(:user, :praise_treads).offset(offset) - logger.info("------#{@discusses.to_sql}") + .select("discusses.*, games.identifier").includes(:praise_treads).offset(offset) else - @discusses = disscusses.limit(LIMIT).includes(:user, :praise_treads).offset(offset) + @discusses = disscusses.limit(LIMIT).includes(:praise_treads).offset(offset) end @current_user = current_user diff --git a/app/views/discusses/_discuss.json.jbuilder b/app/views/discusses/_discuss.json.jbuilder index 7da0b7e1f..3cd42439f 100644 --- a/app/views/discusses/_discuss.json.jbuilder +++ b/app/views/discusses/_discuss.json.jbuilder @@ -9,8 +9,8 @@ json.shixun_id discuss.dis_id json.hidden discuss.hidden json.manage current_user.manager_of_shixun?(container) json.reward discuss.reward -#json.game_url discuss.game_url(container, current_user) -json.game_url "/tasks/#{discuss.identifier}" if @manger && !children +json.game_url discuss.game_url(container, current_user) +#json.game_url "/tasks/#{discuss.identifier}" if @manger && !children # 主贴和回复有一些不同点 if discuss.parent_id json.can_delete discuss.can_deleted?(current_user)