Skip to content

Instantly share code, notes, and snippets.

@skorfmann
Created May 9, 2010 14:18
Show Gist options
  • Save skorfmann/395177 to your computer and use it in GitHub Desktop.
Save skorfmann/395177 to your computer and use it in GitHub Desktop.
<h1>Your Pragmatic Catalog </h1>
<% @products.each do |product| %>
<div class="entry">
<%= link_to image_tag(product.image_url) , line_items_path(:product_id => product.id) ,
:method => :post %>
<h3><%= product.title %></h3>
<%=raw product.description %>
<div class="price_line">
<span class="price"><%= number_to_currency(product.price, :unit => "&euro;",
:separator => "," ) %></span>
<%= button_to 'Add to Cart', line_items_path(:product_id => product.id) %>
</div>
</div>
<% end %>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment