From 1790d0de31e5aa3897c41429945322229a591223 Mon Sep 17 00:00:00 2001 From: Ryan Bigg Date: Thu, 17 Oct 2013 09:52:51 +1100 Subject: [PATCH] Fix AdjustmentsHelper#display_line_item showing empty brackets if a variant had no options text --- backend/app/helpers/spree/admin/adjustments_helper.rb | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/backend/app/helpers/spree/admin/adjustments_helper.rb b/backend/app/helpers/spree/admin/adjustments_helper.rb index 8fd4aac42ff..d39fdd0fb5f 100644 --- a/backend/app/helpers/spree/admin/adjustments_helper.rb +++ b/backend/app/helpers/spree/admin/adjustments_helper.rb @@ -36,7 +36,11 @@ def display_adjustable(adjustable) def display_line_item(line_item) variant = line_item.variant - "#{variant.product.name}
(#{variant.options_text})
#{line_item.display_total}".html_safe + parts = [] + parts << variant.product.name + parts << "(#{variant.options_text})" if variant.options_text.present? + parts << line_item.display_total + parts.join("
").html_safe end def display_shipment(shipment)