|
|
|
@ -17,7 +17,7 @@ class DiscussesController < ApplicationController
|
|
|
|
|
(hidden = :hidden or user_id = :user_id)",
|
|
|
|
|
{dis_id: @container.id, dis_type: @container.class.to_s, hidden: false, user_id: current_user.id})
|
|
|
|
|
.joins(challenge: :games).where("discusses.user_id = games.user_id").select("discusses.*, games.identifier")
|
|
|
|
|
@disscuss_count = disscusses.count
|
|
|
|
|
@disscuss_count = disscusses.count("discusses.id")
|
|
|
|
|
end
|
|
|
|
|
@discusses = disscusses.limit(LIMIT).includes(:user, :praise_treads).offset(offset)
|
|
|
|
|
@manger = @container.has_manager?(current_user)
|
|
|
|
|