Sha256: d176253b95213d302238dc8e141e19c85c874160d189290fadc16244941104cb
Contents?: true
Size: 608 Bytes
Versions: 4
Compression:
Stored size: 608 Bytes
Contents
# frozen_string_literal: true module SolidusFriendlyPromotions module Conditions class Store < Condition include OrderLevelCondition has_many :condition_stores, class_name: "SolidusFriendlyPromotions::ConditionStore", foreign_key: :condition_id, dependent: :destroy has_many :stores, through: :condition_stores, class_name: "Spree::Store" def preload_relations [:stores] end def eligible?(order, _options = {}) stores.none? || stores.include?(order.store) end def updateable? true end end end end
Version data entries
4 entries across 4 versions & 1 rubygems