module PostFlagsHelper
def post_flag_reasons(post)
html = []
html << '
'
post.flags.each do |flag|
html << '- ' + flag.reason
if CurrentUser.is_janitor?
html << ' - ' + link_to(flag.creator.name, user_path(flag.creator))
end
html << ' ' + time_ago_in_words_tagged(flag.created_at) + ' ago
'
end
html << '
'
html.join("\n").html_safe
end
end