Skip to content

Commit

Permalink
display list of products (p48)
Browse files Browse the repository at this point in the history
  • Loading branch information
bryanbibat committed Sep 2, 2011
1 parent eeb4eee commit 44dfbd7
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions app/views/products/index.html.erb
Expand Up @@ -8,4 +8,13 @@
<th>Stock</th>
</tr>

<% @products.each do |product| %>
<tr>
<td><%= product.name %></td>
<td><%= product.description %></td>
<td><%= number_to_currency product.cost, :unit => 'PhP' %></td>
<td><%= product.stock %></td>
</tr>
<% end %>

</table>

0 comments on commit 44dfbd7

Please sign in to comment.