Sha256: 3013869678b5322457ba0e6c5799fac962859cf216aab210ef2a869fa1ac3800
Contents?: true
Size: 297 Bytes
Versions: 9
Compression:
Stored size: 297 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.map(&:activator_id).uniq Spree::Promotion.advertised.where(:id => promotion_ids).reject(&:expired?) end end
Version data entries
9 entries across 9 versions & 2 rubygems