From bb66ed7ce585f61ab918a6d98d6f4d5b322eed98 Mon Sep 17 00:00:00 2001 From: Vincent Charles Date: Sun, 27 Feb 2011 00:42:34 -0800 Subject: [PATCH] Product descriptions can be nil without disrupting checkout --- app/controllers/checkout_controller_decorator.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/checkout_controller_decorator.rb b/app/controllers/checkout_controller_decorator.rb index cc78b68..45c2411 100644 --- a/app/controllers/checkout_controller_decorator.rb +++ b/app/controllers/checkout_controller_decorator.rb @@ -224,7 +224,7 @@ CheckoutController.class_eval do 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,