Sha256: ba52c6d0448d592f660be9e67062196173db91f992ddec4c2bd80b70a151cc03

Contents?: true

Size: 236 Bytes

Versions: 6

Compression:

Stored size: 236 Bytes

Contents

Spree::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

6 entries across 6 versions & 1 rubygems

Version Path
spree_correios_shipping-1.1.4 app/controllers/spree/checkout_controller_decorator.rb
spree_correios_shipping-1.1.3 app/controllers/spree/checkout_controller_decorator.rb
spree_correios_shipping-1.1.2 app/controllers/spree/checkout_controller_decorator.rb
spree_correios_shipping-1.1.1 app/controllers/spree/checkout_controller_decorator.rb
spree_correios_shipping-1.1.0 app/controllers/spree/checkout_controller_decorator.rb
spree_correios_shipping-1.0.0 app/controllers/spree/checkout_controller_decorator.rb