|
|
@ -14,7 +14,7 @@ class DiscussesController < ApplicationController
|
|
|
|
.where("discusses.user_id = games.user_id").select("discusses.*, games.identifier")
|
|
|
|
.where("discusses.user_id = games.user_id").select("discusses.*, games.identifier")
|
|
|
|
else
|
|
|
|
else
|
|
|
|
disscusses = Discuss.where("dis_id = :dis_id and dis_type = :dis_type and root_id is null and
|
|
|
|
disscusses = Discuss.where("dis_id = :dis_id and dis_type = :dis_type and root_id is null and
|
|
|
|
(hidden = :hidden or user_id = :user_id)",
|
|
|
|
(discusses.hidden = :hidden or discusses.user_id = :user_id)",
|
|
|
|
{dis_id: @container.id, dis_type: @container.class.to_s, hidden: false, user_id: current_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")
|
|
|
|
.joins(challenge: :games).where("discusses.user_id = games.user_id").select("discusses.*, games.identifier")
|
|
|
|
@disscuss_count = disscusses.count("discusses.id")
|
|
|
|
@disscuss_count = disscusses.count("discusses.id")
|
|
|
|