timeago -> time_ago_tag

openid
Marcin Kulik 12 years ago
parent d9d85c11e0
commit c94b6ff2d7

@ -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

@ -11,7 +11,7 @@
</h3>
<p class="date">
<%= timeago preview.created_at %> by <%= preview.author_profile_link %>
<%= time_ago_tag preview.created_at %> by <%= preview.author_profile_link %>
</p>
</div>
</div>

@ -40,7 +40,7 @@
<ul class="delimited">
<li>
Recorded: <%= timeago @asciicast.created_at %>
Recorded: <%= time_ago_tag @asciicast.created_at %>
</li>
<li>
Viewed: <%= @asciicast.views_count %> times

Loading…
Cancel
Save