news updates: use relative time instead of date.
Use relative time on site updates to show when a site update was posted
("5m ago"), instead of the date ("Oct 1").
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
<div id="news-updates" data-id="<%= NewsUpdate.recent.first.try(:id) %>" style="display: none;">
|
||||
<ul>
|
||||
<% NewsUpdate.recent.each do |news_update| %>
|
||||
<li><%= news_update.created_at.strftime("%b %d") %>: <%= news_update.message.html_safe %></li>
|
||||
<li><%= time_ago_in_words_tagged(news_update.created_at, compact: true) %> ago: <%= news_update.message.html_safe %></li>
|
||||
<% end %>
|
||||
</ul>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user