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 link_to text, url, opts
end end
def timeago(time, options = {}) def time_ago_tag(time, options = {})
options[:class] ||= "timeago" options[:class] ||= "timeago"
content_tag(:abbr, time.to_s, options.merge(:title => time.getutc.iso8601)) content_tag(:abbr, time.to_s, options.merge(:title => time.getutc.iso8601))
end end

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

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

Loading…
Cancel
Save