Please sign in to comment.
Rescue from shipping error in orders controllers.
Shipping price may be calculated when adding products to order if user is logged & address is filled.
- Loading branch information...
Showing with 11 additions and 0 deletions.
|@@ -0,0 +1,11 @@|
|+# handle shipping errors gracefully during order update|
|+ rescue_from Spree::ShippingError, :with => :handle_shipping_error|
|+ def handle_shipping_error(e)|
|+ flash[:error] = e.message|