Skip to content

Instantly share code, notes, and snippets.

@rmilushev
Created February 18, 2013 10:50
Show Gist options
  • Save rmilushev/4976579 to your computer and use it in GitHub Desktop.
Save rmilushev/4976579 to your computer and use it in GitHub Desktop.
HAML nesting for a clickable region (image and a coule of labels) :
.oneitem.round.shady
= link_to(imot_path(imot)) do
.upperone
.upcontent
%h4= imot.name
%br
= image_tag(imot.image_url(:thumb)) if imot.image?
.lowerone.round
= imot.category.name if imot.category
%br
= imot.location.name if imot.location
%br
= imot.dimension
= imot.metric.name if imot.metric
%br
%h3.printf= number_to_currency(imot.currentprise,:unit => "€", :precision => 0, :delimiter => ' ')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment