Skip to content

Commit

Permalink
class:Order add_variant methods 'current_item' is now an instance of …
Browse files Browse the repository at this point in the history
…'variant' instead of truthy/falsy values. Issue: jsqu99#99.
  • Loading branch information
nefarianblack committed May 26, 2014
1 parent eb64955 commit 8ac1368
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/models/spree/order_decorator.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
module Spree
Order.class_eval do
def add_variant(variant, quantity = 1, ad_hoc_option_value_ids=[], product_customizations=[])
current_item = contains?(variant, ad_hoc_option_value_ids, product_customizations)
current_item = find_line_item_by_variant(variant, ad_hoc_option_value_ids, product_customizations)
if current_item
current_item.quantity += quantity
current_item.save
Expand Down

0 comments on commit 8ac1368

Please sign in to comment.