Permalink
Browse files

Product descriptions can be nil without disrupting checkout

  • Loading branch information...
1 parent fbda454 commit bb66ed7ce585f61ab918a6d98d6f4d5b322eed98 @vjcharles vjcharles committed Feb 27, 2011
Showing with 1 addition and 1 deletion.
  1. +1 −1 app/controllers/checkout_controller_decorator.rb
@@ -224,7 +224,7 @@ def order_opts(order, payment_method, stage)
items = order.line_items.map do |item|
price = (item.price * 100).to_i # convert for gateway
{ :name => item.variant.product.name,
- :description => item.variant.product.description[0..120],
+ :description => (item.variant.product.description[0..120] if item.variant.product.description),
:sku => item.variant.sku,
:qty => item.quantity,
:amount => price,

0 comments on commit bb66ed7

Please sign in to comment.