From e751c53a5de6f05cc2ba30d1c730cb426cdc192a Mon Sep 17 00:00:00 2001 From: rgarcia Date: Sat, 5 Sep 2015 22:00:05 +0200 Subject: [PATCH] converts necessary variables to instance variables --- app/controllers/debates_controller.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/controllers/debates_controller.rb b/app/controllers/debates_controller.rb index 1c5696304..7b6dc8fa1 100644 --- a/app/controllers/debates_controller.rb +++ b/app/controllers/debates_controller.rb @@ -21,8 +21,8 @@ class DebatesController < ApplicationController @root_comments = @debate.comments.roots.recent.page(params[:page]).per(10).for_render @comments = @root_comments.inject([]){|all, root| all + root.descendants} - all_visible_comments = @root_comments + @comments - set_comment_flags(all_visible_comments) + @all_visible_comments = @root_comments + @comments + set_comment_flags(@all_visible_comments) end def new