app/views/items/index.html.erb
<table class="table table-striped table-condensed">
<thead>
<tr>
<th>I lent</th>
<th>my</th>
</tr>
</thead>
<tbody>
<% @items.each do |item| %>
<tr>
<td><%= item.borrower.name if item.borrower %></td>
<td><%= item.title %></td>
<td>
<div class="btn-toolbar">
<div class="btn-group">
<%= link_to 'Edit', [:edit, item], class: 'btn btn-mini' %>
</div>
<div class="btn-group">
<%= link_to 'Archive', "#", class: 'btn btn-mini' %>
<%= link_to 'Delete', "#", method: 'delete', data: {confirm: 'Are you sure?'}, class: 'btn btn-mini btn-danger' %>
</div>
</div>
</td>
</tr>
<% end %>
</tbody>
</table>
<%= paginate @items %>
<%= link_to 'Add item', new_item_path, :class => 'btn btn-primary' %>