<h1>Listing attachments</h1>

<table>
  <tr>
    <th>Data file name</th>
    <th>Data content type</th>
    <th>Data file size</th>
    <th>Data updated at</th>
    <th>Post</th>
    <th></th>
    <th></th>
    <th></th>
  </tr>

<% @attachments.each do |attachment| %>
  <tr>
    <td><%= attachment.data_file_name %></td>
    <td><%= attachment.data_content_type %></td>
    <td><%= attachment.data_file_size %></td>
    <td><%= attachment.data_updated_at %></td>
    <td><%= attachment.post_id %></td>
    <td><%= link_to 'Show', attachment %></td>
    <td><%= link_to 'Edit', edit_attachment_path(attachment) %></td>
    <td><%= link_to 'Destroy', attachment, confirm: 'Are you sure?', method: :delete %></td>
  </tr>
<% end %>
</table>

<br />

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