Sha256: 7f727e6882712c5fd8e63485d29f77536ba66e5ffbc5694f184021bed8439823

Contents?: true

Size: 297 Bytes

Versions: 1

Compression:

Stored size: 297 Bytes

Contents

# handle shipping errors gracefully on admin ui
Admin::ShipmentsController.class_eval do
  rescue_from Spree::ShippingError, :with => :handle_shipping_error

  private
    def handle_shipping_error(e)
      load_object
      flash.now[:error] = e.message
      render :action => "edit"
    end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
spree_active_shipping-1.0.0 app/controllers/admin/shipments_controller_decorator.rb