From 44dfbd7156414d9859d9aeed17a3dc38bb3f4cdd Mon Sep 17 00:00:00 2001 From: Bryan Bibat Date: Fri, 2 Sep 2011 11:49:55 +0800 Subject: [PATCH] display list of products (p48) --- app/views/products/index.html.erb | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/app/views/products/index.html.erb b/app/views/products/index.html.erb index 9d0d05a..2c5b856 100644 --- a/app/views/products/index.html.erb +++ b/app/views/products/index.html.erb @@ -8,4 +8,13 @@ Stock + <% @products.each do |product| %> + + <%= product.name %> + <%= product.description %> + <%= number_to_currency product.cost, :unit => 'PhP' %> + <%= product.stock %> + + <% end %> +