Sha256: 18ed9f85bc47dd282d709a4ce0968a0641f962c280fe5eb60158b665ac7abb5b
Contents?: true
Size: 298 Bytes
Versions: 4
Compression:
Stored size: 298 Bytes
Contents
Spree::Product.class_eval do has_and_belongs_to_many :promotion_rules, :join_table => :spree_products_promotion_rules def possible_promotions promotion_ids = promotion_rules.pluck(:activator_id).uniq Spree::Promotion.advertised.where(:id => promotion_ids).reject(&:expired?) end end
Version data entries
4 entries across 4 versions & 1 rubygems