2017-03-20 10:57:50 -05:00
|
|
|
<div>
|
2017-02-13 18:08:51 -06:00
|
|
|
<%= comment.message %>
|
|
|
|
|
|
|
|
<% if policy(comment).update? %>
|
2017-03-20 10:57:50 -05:00
|
|
|
<label class="" for="comment-<%= comment.id %>">edit</label>
|
2017-02-13 18:08:51 -06:00
|
|
|
<% end %>
|
|
|
|
|
|
|
|
<% if comment.edits? %>
|
2017-05-19 10:38:13 -05:00
|
|
|
<div>Updated <%= local_time_ago(comment.updated_at) %></div>
|
2017-02-24 16:05:10 -06:00
|
|
|
<% else %>
|
2017-05-19 10:38:13 -05:00
|
|
|
<div><%= local_time_ago(comment.created_at) %></div>
|
2017-02-13 18:08:51 -06:00
|
|
|
<% end %>
|
|
|
|
</div>
|
|
|
|
|
2017-03-20 10:57:50 -05:00
|
|
|
<div><%= comment.user.name %></div>
|
2017-02-13 18:08:51 -06:00
|
|
|
|
|
|
|
<% if policy(comment).update? %>
|
|
|
|
<input type="checkbox" id="comment-<%= comment.id %>">
|
2017-03-20 10:57:50 -05:00
|
|
|
<%= render partial: 'comment_form', locals: {comment: comment, test_hash: comment.test_hash } %>
|
2017-02-13 18:08:51 -06:00
|
|
|
<% end %>
|