Listing attachments

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

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