Sha256: 0b7510b126d3b1cd9acbfc1cb6db05169c03f36873f136f7ac85492064828151
Contents?: true
Size: 538 Bytes
Versions: 23
Compression:
Stored size: 538 Bytes
Contents
module Spree module Admin module OrderConcern extend ActiveSupport::Concern included do rescue_from ActiveRecord::RecordNotFound, with: :resource_not_found end protected def load_order @order = current_store.orders.find_by!(number: params[:order_id]) authorize! action, @order @order end def resource_not_found flash[:error] = flash_message_for(model_class.new, :not_found) redirect_to spree.admin_orders_path end end end end
Version data entries
23 entries across 23 versions & 1 rubygems