Sha256: 7f5fd4849d8f52ea8f290e476f22796615f5245f87943cfac3666283ac24ec71

Contents?: true

Size: 291 Bytes

Versions: 1

Compression:

Stored size: 291 Bytes

Contents

# handle shipping errors gracefully during checkout
CheckoutController.class_eval do
  
  rescue_from Spree::ShippingError, :with => :handle_shipping_error

  private
    def handle_shipping_error(e)
      flash[:error] = e.message
      redirect_to checkout_state_path(:address)
    end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
spree_active_shipping-1.0.0 app/controllers/checkout_controller_decorator.rb