<% @messages.each do |message| %>

<% if message.content %> <%= CommonMarker.render_html(message.content).html_safe %> <% end %> <% if message.attachments %> <% message.attachments.each do |attachment| %> attachment [click here to view] <% end %> <% end %>

<% end %>