timestamps

This commit is contained in:
Andrew Brown 2019-05-03 20:22:32 -05:00
parent 82f72a4099
commit 90f70930da
2 changed files with 8 additions and 6 deletions

View File

@ -8,6 +8,6 @@ class ContentChangeEvent < ApplicationRecord
end
def entity
content.entity
content.try(:entity) || content
end
end

View File

@ -23,13 +23,15 @@
%>
</h5>
<p>
<% if entity.universe.present? %>
<%= @user.name %>
<%= change_events.first.action %> a
<%= entity.class.name.downcase %> in the
<%= @user.name %>
<%= change_events.first.action %> a
<%= entity.class.name.downcase %>
<% if !entity.is_a?(Universe) && entity.universe.present? %>
in the
<%= link_to entity.universe.name, entity.universe, class: "#{Universe.color}-text" %>
universe.
universe
<% end %>
<span class="grey-text"><%= time_ago_in_words(change_events.first.updated_at) %> ago</span>.
</p>
</div>
<div class="card-action">