Translated emails and added time ago JS method

This commit is contained in:
Godwin
2016-08-05 22:31:25 -07:00
parent f6299e8d99
commit 973ca46c08
7 changed files with 65 additions and 8 deletions
+3
View File
@@ -1361,6 +1361,9 @@ module ApplicationHelper
end
def comment(comment)
add_inline_script :time
add_js_translation('datetime.distance_in_words')
content_tag(:div, class: 'comment-body') do
content_tag(:h4, comment.user.name, class: 'comment-title') +
content_tag(:time, time(comment.created_at, :default), datetime: comment.created_at.to_s) +