23 lines
578 B
Plaintext
Raw Normal View History

2024-07-11 19:55:48 +02:00
<p style="color: green"><%= notice %></p>
<h1>Expenses</h1>
<div id="expenses">
2024-07-11 19:57:51 +02:00
<table>
<tr>
<th>Name</th>
<th>Amount</th>
<th colspan="3"></th>
</tr>
2024-07-11 19:55:48 +02:00
<% @expenses.each do |expense| %>
2024-07-11 19:57:51 +02:00
<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>
2024-07-11 19:55:48 +02:00
<% end %>
</div>
<%= link_to "New expense", new_expense_path %>