Skip to content

Instantly share code, notes, and snippets.

@greendezine
Created August 3, 2012 02:18
Show Gist options
  • Save greendezine/3243585 to your computer and use it in GitHub Desktop.
Save greendezine/3243585 to your computer and use it in GitHub Desktop.
if/elseif
<span <% if formatted_price_for(@daily_deal.price_to_display).length == 6 %>
style="font-size: 75%">
<% elsif formatted_price_for(@daily_deal.price_to_display).length == 7 %>
style="font-size: 65%">
<% elsif formatted_price_for(@daily_deal.price_to_display).length > 7 %>
style="font-size: 55%">
<% else %>
style="font-size: 100%">
<% end %>
<%= formatted_price_for(@daily_deal.price_to_display) %>
</span>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment