app/views/documents/index.html.erb
<h1>Listing documents</h1>
<table>
<thead>
<tr>
<th>Name</th>
<th>Data</th>
<th colspan="3"></th>
</tr>
</thead>
<tbody>
<% @documents.each do |document| %>
<tr>
<td><%= document.name %></td>
<td><%= document.data %></td>
<td><%= link_to 'Show', document %></td>
<td><%= link_to 'Edit', edit_document_path(document) %></td>
<td><%= link_to 'Destroy', document, method: :delete, data: { confirm: 'Are you sure?' } %></td>
</tr>
<% end %>
</tbody>
</table>
<br>
<%= link_to 'New Document', new_document_path %>