Sha256: feadc4080651de56877513cfdeaa50c3c533458a761f568649e0d38f8f05a446

Contents?: true

Size: 935 Bytes

Versions: 4

Compression:

Stored size: 935 Bytes

Contents

<h2>Listing items</h2>

<table>
  <tr>
    <td>date</td>
    <td>category</td>
    <td>title</td>
    <td>amount</td>
    <td>account</td>
  </tr>

<% @items.each do |item| %>
  <tr>
    <td><%=h item.date %></td>
    <td><%=h item.category.try(:name) %></td>
    <td><%=h item.title %></td>
    <td><%=h item.amount %></td>
    <td>
      <% if item.is_a?(Move) %>
        <%=h item.account_from.try(:name) || "?" %>→
        <%=h item.account_to.try(:name) || "?" %>
      <% elsif item.is_a?(Expense) %>
        ←<%=h item.account.name %>
      <% else %>
        →<%=h item.account.name %>
      <% end %>
    </td>
    <!--<td><%= link_to 'Show', item %></td>-->
    <td><%= link_to 'Edit', edit_item_path(item) %></td>
    <td><%= link_to 'Destroy', item, :confirm => 'Are you sure?', :method => :delete %></td>
  </tr>
<% end %>
</table>

<br />

<%= link_to 'New item', new_item_path %>

<%= link_to 'back', root_path %>

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
moneyrail-0.1.6 app/views/items/index.html.erb
moneyrail-0.1.5 app/views/items/index.html.erb
moneyrail-0.1.4 app/views/items/index.html.erb
moneyrail-0.1.2 app/views/items/index.html.erb