Sha256: bf599f396e23abeafecec501f2e1601dab2e72432dc42faaf45bff4bf06835e0
Contents?: true
Size: 437 Bytes
Versions: 14
Compression:
Stored size: 437 Bytes
Contents
module SpreeMultiDomain::ShowProductSupport extend ActiveSupport::Concern included do prepend(InstanceMethods) before_filter :can_show_product, :only => :show end module InstanceMethods def can_show_product @product ||= Spree::Product.friendly.find(params[:id]) if @product.stores.empty? || !@product.stores.include?(current_store) raise ActiveRecord::RecordNotFound end end end end
Version data entries
14 entries across 14 versions & 1 rubygems