28 lines
556 B
Plaintext
28 lines
556 B
Plaintext
<table id="transactions" class="display">
|
|
<thead>
|
|
<tr>
|
|
<th>id</th>
|
|
<th>debtor</th>
|
|
<th>creditor</th>
|
|
<th>amount</th>
|
|
</tr>
|
|
</thead>
|
|
|
|
<tbody>
|
|
<% @transactions.each do |transaction| %>
|
|
<tr>
|
|
<td><%= transaction.id %></td>
|
|
<td><%= transaction.debtor.name %></td>
|
|
<td><%= transaction.creditor.name %></td>
|
|
<td><%= transaction.amount%></td>
|
|
</tr>
|
|
<% end %>
|
|
</tbody>
|
|
</table>
|
|
|
|
<script>
|
|
$(document).ready(function() {
|
|
$('#transactions').DataTable();
|
|
});
|
|
</script>
|