converts necessary variables to instance variables

This commit is contained in:
rgarcia
2015-09-05 22:00:05 +02:00
parent 0e1678467d
commit e751c53a5d

View File

@@ -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