<%= simple_format h comment.body %>

By <%= comment.author %>

<% deleteMessage = "Are you sure you want to delete this comment?" unless comment.children.empty? deleteMessage += " Note that this will remove all replies to this "\ "comment as well." end replyComment = comment.children.build %> <%= link_to "Reply", "#", class: "reply", data: { form: "#{render(partial: "proclaim/comments/form", locals: {comment: replyComment, target: target})}", target: target } %> <% if policy(comment).destroy? %> <%= link_to "Edit", "#", class: "edit", data: { form: "#{render(partial: "proclaim/comments/form", locals: {comment: comment})}" } %> <% end %> <% if policy(comment).destroy? %> <%= link_to "Delete", comment, method: :delete, remote: true, class: "delete", data: { confirm: deleteMessage } %> <% end %>