Sha256: 0af568b33d8c586d8d6bbec272992945320a54152892b9c1f4ffdbcdc475b19d

Contents?: true

Size: 332 Bytes

Versions: 8

Compression:

Stored size: 332 Bytes

Contents

# Base class for all promotion rules
class PromotionRule < ActiveRecord::Base
  belongs_to :promotion, :foreign_key => 'activator_id'

  scope :of_type, lambda {|t| {:conditions => {:type => t}}}

  def eligible?(order, options = {})
    raise 'eligible? should be implemented in a sub-class of Promotion::PromotionRule'
  end

end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
spree_promo-0.70.7 app/models/promotion_rule.rb
spree_promo-0.70.6 app/models/promotion_rule.rb
spree_promo-0.70.5 app/models/promotion_rule.rb
spree_promo-0.70.4 app/models/promotion_rule.rb
spree_promo-0.70.3 app/models/promotion_rule.rb
spree_promo-0.70.2 app/models/promotion_rule.rb
spree_promo-0.70.1 app/models/promotion_rule.rb
spree_promo-0.70.0 app/models/promotion_rule.rb