% markdown = Redcarpet::Markdown.new(Redcarpet::Render::HTML, autolink: true, tables: true) %>
<% @messages.each do |message| %>
<%= message.sender&.try(:available_name) || message.sender&.name || '' %>
|
<% if message.content %>
<%= markdown.render(message.content).html_safe %>
<% end %>
<% if message.attachments %>
<% message.attachments.each do |attachment| %>
Attachment [Click here to view]
<% end %>
<% end %>
|
<% end %>