Skip to content

Instantly share code, notes, and snippets.

@deJaVisions
Created October 11, 2011 08:29
Show Gist options
  • Select an option

  • Save deJaVisions/1277571 to your computer and use it in GitHub Desktop.

Select an option

Save deJaVisions/1277571 to your computer and use it in GitHub Desktop.
= get_recently_viewed_products()
-if @promoted_items.empty?
there are currently no promoted items
-else
- @promoted_items.map do |promo|
%hr
- product = Product.find_by_id(promo.product_id)
%div{align: :left}
= link_to(product.name, url_for(product))
- if product.images.size > 1
- product.images.map do |image|
%div
= link_to image_tag(image.attachment.url(:product)), url_for(product)
%span.price_selling
= product_price(product)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment