app/views/invoices/index.html.erb
<section class="content-header">
</section>
<section class="content">
<div class="box">
<div class="box-header">
<h3 class="box-title">Invoices</h3>
<div class="box-tools pull-right">
<div class="btn-group">
<%# link_to "Add Invoice", new_invoice_path, class: "btn btn-primary" %>
</div>
</div>
</div>
<div class="box-body">
<div class="">
<table class="table" id="invoices-table" >
<thead>
<tr>
<th> Invoice Number </th>
<th> Customer </th>
<th> Actions </th>
</tr>
</thead>
<tbody>
<% @invoices.each do |invoice| %>
<tr>
<td> <%= invoice.invoice_number %> </td>
<td> <%= invoice.customer.first_name if invoice.customer %> </td>
<td> <%= render "actions", invoice: invoice %> </td>
</tr>
<% end %>
</tbody>
</table>
</div>
</div>
</div>
</section>