Uses @comment_flags in everything comment-related

This commit is contained in:
kikito
2015-09-01 13:10:19 +02:00
parent d0c7c7fe79
commit 99fd0a917d
4 changed files with 14 additions and 1 deletions

View File

@@ -71,6 +71,10 @@ class ApplicationController < ActionController::Base
@debate_votes = current_user ? current_user.debate_votes(debates) : {}
end
def set_comment_flags(comments)
@comment_flags = current_user ? current_user.comment_flags(comments) : {}
end
def ensure_signup_complete
# Ensure we don't go into an infinite loop
return if action_name.in? %w(finish_signup do_finish_signup)