Permalink
Browse files

Ensure decorators only added once in Ruby 1.8.

  • Loading branch information...
1 parent ccbd3ba commit 415feb2f00889510ad40818bca4f4e0a30cefdba @jviney committed Jun 26, 2011
@@ -38,4 +38,4 @@ def update_order_with_volume_discount
def check_update_volume_discount
update_volume_discount if price_changed? || quantity_changed?
end
-end unless LineItem.instance_methods.include? :amount_with_volume_discount
+end unless LineItem.instance_method_names.include? "amount_with_volume_discount"
@@ -73,4 +73,4 @@ def update_product_volume_discount product
i.update_attributes_without_callbacks :volume_discount => 0.0
end
end
-end unless Order.instance_methods.include? :update_totals_on_user_association
+end unless Order.instance_method_names.include? "update_product_volume_discount"
@@ -27,4 +27,4 @@ def duplicate_extra original
VolumePrice.new vp.attributes.slice('starting_quantity', 'price')
end
end
-end unless Product.instance_methods.include? :all_variant_ids
+end unless Product.instance_method_names.include? "all_variant_ids"
@@ -85,4 +85,4 @@ def progressive_total_cost units_processed, quantity
total_cost
end
-end unless Variant.instance_methods.include? :volume_prices_source
+end unless Variant.instance_method_names.include? "volume_prices_source"

0 comments on commit 415feb2

Please sign in to comment.