Skip to content

Instantly share code, notes, and snippets.

@stephenprater
Created August 20, 2011 19:47
Show Gist options
  • Save stephenprater/1159559 to your computer and use it in GitHub Desktop.
Save stephenprater/1159559 to your computer and use it in GitHub Desktop.
<div id="main_image" class="<%= content_for :image_width -%>">
<a href="<%= @product.image_file.downcase %>" rel="popup">
<%= render :layout => false do %>
<% options, itag = medium_image :id => "primary" -%>
<% content_for :image_width do
options[:width] > 362 ? "wide_image" : "narrow_image"
end %>
<%= itag %>
<% end -%>
</a>
</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment