Sha256: 1ca6422752602a472eda1abdc9a2d7fddb0e06a4def0150401a2d9c9b496ef14
Contents?: true
Size: 274 Bytes
Versions: 2
Compression:
Stored size: 274 Bytes
Contents
# frozen_string_literal: true module Spree class PromotionAdvertiser def self.for_product(product) promotion_ids = product.promotion_rules.map(&:promotion_id).uniq Spree::Promotion.advertised.where(id: promotion_ids).reject(&:inactive?) end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
solidus_legacy_promotions-4.4.1 | app/models/spree/promotion_advertiser.rb |
solidus_legacy_promotions-4.4.0 | app/models/spree/promotion_advertiser.rb |