diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index 858c451..1ed2e30 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -36,7 +36,7 @@ module ApplicationHelper link_to text, url, opts end - def timeago(time, options = {}) + def time_ago_tag(time, options = {}) options[:class] ||= "timeago" content_tag(:abbr, time.to_s, options.merge(:title => time.getutc.iso8601)) end diff --git a/app/views/asciicasts/_preview.html.erb b/app/views/asciicasts/_preview.html.erb index 36def66..5308fc5 100644 --- a/app/views/asciicasts/_preview.html.erb +++ b/app/views/asciicasts/_preview.html.erb @@ -11,7 +11,7 @@

- <%= timeago preview.created_at %> by <%= preview.author_profile_link %> + <%= time_ago_tag preview.created_at %> by <%= preview.author_profile_link %>

diff --git a/app/views/asciicasts/show.html.erb b/app/views/asciicasts/show.html.erb index fd76d82..731bc54 100644 --- a/app/views/asciicasts/show.html.erb +++ b/app/views/asciicasts/show.html.erb @@ -40,7 +40,7 @@