<h1>Listing attachments</h1>

<table>
  <tr>
    <th>Name</th>
    <th></th>
    <th></th>
    <th></th>
  </tr>

<% @attachments.each do |attachment| %>
  <tr>
    <td><%= attachment.name %></td>
    <td><%= link_to 'Show', attachment %></td>
    <td><%= link_to 'Edit', edit_attachment_path(attachment) %></td>
    <td><%= link_to 'Destroy', attachment, method: :delete, data: { confirm: 'Are you sure?' } %></td>
  </tr>
<% end %>
</table>

<br />

<%= link_to 'New Attachment', new_attachment_path %>
