5 6 7 8
# File 'app/models/spree/promotion_advertiser.rb', line 5 def self.for_product(product) promotion_ids = product.promotion_rules.map(&:promotion_id).uniq Spree::Promotion.advertised.where(id: promotion_ids).reject(&:inactive?) end