Sha256: 3a10d69f612fb907f042d2a83d02ab2ed742e9771720f087d73f3b0ffa363d12
Contents?: true
Size: 305 Bytes
Versions: 10
Compression:
Stored size: 305 Bytes
Contents
Spree::Product.class_eval do has_and_belongs_to_many :promotion_rules, :join_table => 'spree_products_promotion_rules' def possible_promotions all_rules = promotion_rules promotion_ids = all_rules.map(&:activator_id).uniq Spree::Promotion.advertised.where(:id => promotion_ids) end end
Version data entries
10 entries across 10 versions & 1 rubygems