Sha256: 33ec5237be0cc6dd49b6664a50c8e7a985e15c0d4e4729ea04d39d955ea1be70
Contents?: true
Size: 583 Bytes
Versions: 7
Compression:
Stored size: 583 Bytes
Contents
Spree::Tracker.class_eval do belongs_to :store def self.current(store) if store.is_a?(Spree::Store) Spree::Tracker.where(active: true, store_id: store).first else # TODO: Remove in 2.0 ActiveSupport::Deprecation.warn <<-EOS.squish, caller Calling Spree::Tracker.current with a string is DEPRECATED. Instead pass it an instance of Spree::Store. EOS Spree::Tracker.where(active: true).joins(:store).where( "spree_stores.code = ? OR spree_stores.url LIKE ?", store, "%#{store}%" ).first end end end
Version data entries
7 entries across 7 versions & 1 rubygems