app/models/promotion_rule.rb in spree_promo-0.40.4 vs app/models/promotion_rule.rb in spree_promo-0.50.0

- old
+ new

@@ -1,12 +1,12 @@ # Base class for all promotion rules class PromotionRule < ActiveRecord::Base belongs_to :promotion - + scope :of_type, lambda {|t| {:conditions => {:type => t}}} - + def eligible?(order) raise 'eligible? should be implemented in a sub-class of Promotion::PromotionRule' end @rule_classes = nil @@ -16,11 +16,11 @@ end def self.rule_classes @@rule_classes.to_a end - + def self.rule_class_names PromotionRule.rule_classes.map(&:name) end - + end