Skip to content

Instantly share code, notes, and snippets.

@ornerymoose
Created May 11, 2012 20:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ornerymoose/2662235 to your computer and use it in GitHub Desktop.
Save ornerymoose/2662235 to your computer and use it in GitHub Desktop.
refactored
- cc_or_check = ["Check", "Credit Card"][[@bulk_order.check, @bulk_order.credit_card].index("1")]
%h3{ :style => "font-size: 14px; color: #848687; font-weight: bold;" } Check or CC Used:
%p{:style => "border-bottom:1px #CCC dashed;margin-bottom:10px;padding:5px 0;"}= cc_or_check
- cc_type = ["Discover", "American Express", "Visa", "Mastercard"][[@bulk_order.discover, @bulk_order.amex, @bulk_order.visa, @bulk_order.mc].index("1")]
%h3{ :style => "font-size: 14px; color: #848687; font-weight: bold;" } Payment Option Chosen:
%ul
%li{ :style => "font-size: 13px; color: #848687;" }= cc_type
%li{ :style => "font-size: 13px; color: #848687;" }= "Last Four Digits of Credit Card: #{@bulk_order.four_digits}"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment