Class: Spree::Promotion::Rules::UserLoggedIn

Inherits:
Spree::PromotionRule show all
Defined in:
app/models/spree/promotion/rules/user_logged_in.rb

Instance Method Summary collapse

Instance Method Details

#eligible?(order, options = {}) ⇒ Boolean

Returns:

  • (Boolean)


6
7
8
# File 'app/models/spree/promotion/rules/user_logged_in.rb', line 6

def eligible?(order, options = {})
  return order.try(:user).try(:anonymous?) == false
end