Display table of expenses
This commit is contained in:
parent
98eb2e0473
commit
c4e25d22a8
@ -3,11 +3,19 @@
|
||||
<h1>Expenses</h1>
|
||||
|
||||
<div id="expenses">
|
||||
<table>
|
||||
<tr>
|
||||
<th>Name</th>
|
||||
<th>Amount</th>
|
||||
<th colspan="3"></th>
|
||||
</tr>
|
||||
<% @expenses.each do |expense| %>
|
||||
<%= render expense %>
|
||||
<p>
|
||||
<%= link_to "Show this expense", expense %>
|
||||
</p>
|
||||
<tr>
|
||||
<td><%= expense.name %></td>
|
||||
<td><%= expense.amount %></td>
|
||||
<td><%= link_to "Show", expense %></td>
|
||||
<td><%= link_to "Edit", edit_expense_path(expense) %></td>
|
||||
<td><%= link_to "Destroy", expense, method: :delete, data: { confirm: "Are you sure?" } %></td>
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user