Add a friendly_date_ago helper

Refs #2255
This commit is contained in:
Andy Allan 2019-06-19 11:59:37 +02:00
parent 54e0c7afb2
commit f284d57c62

View file

@ -49,6 +49,10 @@ module ApplicationHelper
content_tag(:span, time_ago_in_words(date), :title => l(date, :format => :friendly))
end
def friendly_date_ago(date)
content_tag(:span, time_ago_in_words(date, :scope => :'datetime.distance_in_words_ago'), :title => l(date, :format => :friendly))
end
def body_class
if content_for? :body_class
content_for :body_class