Sha256: ce30d232a9b932d40f7bf0d818aacde7b41e34b4575ff1df1860a5c87cb776bf
Contents?: true
Size: 348 Bytes
Versions: 5
Compression:
Stored size: 348 Bytes
Contents
# frozen_string_literal: true module SolidusPromotions class PromotionAdvertiser def self.for_product(product) promotion_ids = ConditionProduct.joins(condition: :benefit).where(product: product).select(:promotion_id).distinct SolidusPromotions::Promotion.advertised.where(id: promotion_ids).reject(&:inactive?) end end end
Version data entries
5 entries across 5 versions & 1 rubygems