converts necessary variables to instance variables
This commit is contained in:
@@ -21,8 +21,8 @@ class DebatesController < ApplicationController
|
|||||||
@root_comments = @debate.comments.roots.recent.page(params[:page]).per(10).for_render
|
@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 + root.descendants}
|
||||||
|
|
||||||
all_visible_comments = @root_comments + @comments
|
@all_visible_comments = @root_comments + @comments
|
||||||
set_comment_flags(all_visible_comments)
|
set_comment_flags(@all_visible_comments)
|
||||||
end
|
end
|
||||||
|
|
||||||
def new
|
def new
|
||||||
|
|||||||
Reference in New Issue
Block a user