use time helper for ago.js

This commit is contained in:
jomo
2014-10-12 22:28:12 +02:00
parent e9eef188d6
commit b574ea3e9e
9 changed files with 42 additions and 12 deletions

View File

@@ -10,6 +10,14 @@ module ApplicationHelper
site_headers
end
def time(tm)
if tm
content_tag :time, title: tm.strftime("%e %b %Y, %H:%M"), datetime: tm.to_datetime.rfc3339 do
tm.strftime("%e %b %Y, %H:%M")
end
end
end
def render_md(content)
renderer = Redcarpet::Render::HTML.new({
filter_html: true,