Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fixing a "stack level too deep" error on 64-bit Ruby, by using write_…

…attribute instead of recursively calling the setter.

Fixes #1. Merges #2.
  • Loading branch information...
commit 15d7e246e15ece691fa7b3daced3e705424ba649 1 parent 785f609
Bèr Kessels authored committed
Showing with 1 addition and 3 deletions.
  1. +1 −3 app/models/spree/variant_decorator.rb
4 app/models/spree/variant_decorator.rb
View
@@ -1,8 +1,6 @@
Spree::Variant.class_eval do
- alias_method :old_price=, :price=
-
def price=(value)
- self.old_price = SpreeLocalize.normalize_number(value)
+ write_attribute(:price, SpreeLocalize.normalize_number(value))
end
[:cost_price, :weight, :height, :width, :depth].each do |attribute|
Please sign in to comment.
Something went wrong with that request. Please try again.