From 3845e6bfd2ded77ee4651508e02f2c03d77a6670 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juanjo=20Baz=C3=A1n?= Date: Sun, 6 Sep 2015 12:46:14 +0200 Subject: [PATCH] shows visible children of hidden comments Fixes #368 --- app/controllers/debates_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/debates_controller.rb b/app/controllers/debates_controller.rb index 7b6dc8fa1..78a465572 100644 --- a/app/controllers/debates_controller.rb +++ b/app/controllers/debates_controller.rb @@ -19,7 +19,7 @@ class DebatesController < ApplicationController set_debate_votes(@debate) @commentable = @debate @root_comments = @debate.comments.roots.recent.page(params[:page]).per(10).for_render - @comments = @root_comments.inject([]){|all, root| all + root.descendants} + @comments = @root_comments.inject([]){|all, root| all + Comment.descendants_of(root).for_render} @all_visible_comments = @root_comments + @comments set_comment_flags(@all_visible_comments)