实训回复'

dev_forum
daiao 5 years ago
parent 10143e40c3
commit c87f58bc73

@ -20,9 +20,9 @@ class DiscussesController < ApplicationController
@manger = @container.has_manager?(current_user) @manger = @container.has_manager?(current_user)
if @manger if @manger
@discusses = disscusses.limit(LIMIT).joins("left join games on discusses.challenge_id = games.challenge_id and discusses.user_id = games.user_id") @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 else
@discusses = disscusses.limit(LIMIT).includes(:praise_treads).offset(offset) @discusses = disscusses.limit(LIMIT).includes(:user, :praise_treads).offset(offset)
end end
@current_user = current_user @current_user = current_user

Loading…
Cancel
Save