use time helper for ago.js
This commit is contained in:
@@ -7,7 +7,10 @@
|
||||
<div class="item-group with-avatar" id="post-<%= p.id %>">
|
||||
<div class="header">
|
||||
<%= link_to(p.author.avatar(64), p.author, title: p.author.ign) %>
|
||||
<%= render partial: "users/username", locals: { user: p.author } %> <%= link_to p do %><time title="<%= p.created_at.strftime("%e %b %Y, %H:%M") %>" datetime="<%= p.created_at.to_datetime.rfc3339 %>"><%= p.created_at.strftime("%e %b %Y, %H:%M") %></time><% end %>
|
||||
<%= render partial: "users/username", locals: { user: p.author } %>
|
||||
<%= link_to p do %>
|
||||
<%= time p.created_at %>
|
||||
<% end %>
|
||||
<span class="comment-counter">
|
||||
<%= link_to pluralize(p.comments.count, "Comment"), p %>
|
||||
</span>
|
||||
|
||||
@@ -6,7 +6,10 @@
|
||||
<div class="item-group post with-avatar" id="post-<%= @post.id %>">
|
||||
<div class="header">
|
||||
<%= link_to(@post.author.avatar(64), @post.author, title: @post.author.ign) %>
|
||||
<%= render partial: "users/username", locals: { user: @post.author } %> <%= link_to p do %><time title="<%= @post.created_at.strftime("%e %b %Y, %H:%M") %>" datetime="<%= @post.created_at.to_datetime.rfc3339 %>"><%= @post.created_at.strftime("%e %b %Y, %H:%M") %></time><% end %>
|
||||
<%= render partial: "users/username", locals: { user: @post.author } %>
|
||||
<%= link_to p do %>
|
||||
<%= time @post.created_at %>
|
||||
<% end %>
|
||||
<%= link_to "edit", edit_blogpost_path(@post.id), class: "editlink" if mod? %>
|
||||
<div class="clear-right"></div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user