|
|
|
@ -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
|
|
|
|
|