Class: Spree::Promotion::Rules::UserLoggedIn
- Inherits:
-
Spree::PromotionRule
- Object
- ActiveRecord::Base
- Spree::PromotionRule
- Spree::Promotion::Rules::UserLoggedIn
- Defined in:
- app/models/spree/promotion/rules/user_logged_in.rb
Instance Method Summary collapse
Methods inherited from Spree::PromotionRule
Instance Method Details
#applicable?(promotable) ⇒ Boolean
5 6 7 |
# File 'app/models/spree/promotion/rules/user_logged_in.rb', line 5 def applicable?(promotable) promotable.is_a?(Spree::Order) end |
#eligible?(order, options = {}) ⇒ Boolean
9 10 11 |
# File 'app/models/spree/promotion/rules/user_logged_in.rb', line 9 def eligible?(order, = {}) return order.user.present? end |