Skip to content

Commit

Permalink
Fix AdjustmentsHelper#display_line_item showing empty brackets if a v…
Browse files Browse the repository at this point in the history
…ariant had no options text
  • Loading branch information
radar committed Oct 21, 2013
1 parent 28c7ba3 commit 1790d0d
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion backend/app/helpers/spree/admin/adjustments_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,11 @@ def display_adjustable(adjustable)

def display_line_item(line_item)
variant = line_item.variant
"#{variant.product.name} <br>(#{variant.options_text})<br>#{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("<br>").html_safe
end

def display_shipment(shipment)
Expand Down

0 comments on commit 1790d0d

Please sign in to comment.