remove custom calculator no longer needed with the new Spree shipping calculator.

This commit is contained in:
2013-06-03 00:23:44 +01:00
parent efb07409e9
commit bcb041c553

View File

@@ -17,15 +17,4 @@ Spree::Order.class_eval do
end
end
# UPGRADE_CHECK this works as of spree 1.2.0. check function for changes on upgrade
def available_shipping_methods(display_on = nil)
return [] unless ship_address
all_methods = Spree::ShippingMethod.all_available(self, display_on)
if self.digital?
all_methods.detect { |m| m.calculator.class == Spree::Calculator::DigitalDelivery }.try { |d| [d] } || all_methods
else
all_methods
end
end
end