Sha256: 162fb550bfd6b5e0393fe6b5d77b5400f88d6a8d41b285f2efba78d47bf451d0

Contents?: true

Size: 156 Bytes

Versions: 10

Compression:

Stored size: 156 Bytes

Contents

class Promotion::Rules::FirstOrder < PromotionRule

  def eligible?(order, options = {})
    order.user && order.user.orders.complete.count == 0
  end

end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
spree_promo-0.70.7 app/models/promotion/rules/first_order.rb
spree_promo-0.70.6 app/models/promotion/rules/first_order.rb
spree_promo-0.70.5 app/models/promotion/rules/first_order.rb
spree_promo-0.70.4 app/models/promotion/rules/first_order.rb
spree_promo-0.70.3 app/models/promotion/rules/first_order.rb
spree_promo-0.70.2 app/models/promotion/rules/first_order.rb
spree_promo-0.70.1 app/models/promotion/rules/first_order.rb
spree_promo-0.70.0 app/models/promotion/rules/first_order.rb
spree_promo-0.70.0.rc2 app/models/promotion/rules/first_order.rb
spree_promo-0.70.RC1 app/models/promotion/rules/first_order.rb