Commit 3d17a81a by Ibrahim Awwal

Fix thread count query in user profile.

parent e097ed98
......@@ -68,8 +68,8 @@ class User
)
end
if params[:course_id]
hash = hash.merge("threads_count" => CommentThread.where(user_id: id, course_id: params[:course_id]).count,
"comments_count" => Comment.where(user_id: id, course_id: params[:course_id]).count
hash = hash.merge("threads_count" => CommentThread.where(author_id: id, course_id: params[:course_id]).count,
"comments_count" => Comment.where(author_id: id, course_id: params[:course_id]).count
)
end
hash
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment