Separate with comma views, likes, dislikes

This commit is contained in:
Omar Roth
2018-03-03 15:10:56 -06:00
parent 24cea8f3e7
commit 84c8fb9b99
2 changed files with 7 additions and 3 deletions

View File

@@ -320,3 +320,7 @@ def template_comments(root)
return html
end
def number_with_separator(number)
number.to_s.reverse.gsub(/(\d{3})(?=\d)/, "\\1,").reverse
end