Class: SolidusFriendlyPromotions::Conditions::UserLoggedIn
- Inherits:
-
SolidusFriendlyPromotions::Condition
- Object
- Spree::Base
- SolidusFriendlyPromotions::Condition
- SolidusFriendlyPromotions::Conditions::UserLoggedIn
- Includes:
- OrderLevelCondition
- Defined in:
- app/models/solidus_friendly_promotions/conditions/user_logged_in.rb
Instance Method Summary collapse
Methods included from OrderLevelCondition
Methods inherited from SolidusFriendlyPromotions::Condition
#applicable?, #eligibility_errors, #level, #preload_relations, #to_partial_path, #updateable?
Instance Method Details
#eligible?(order, _options = {}) ⇒ Boolean
8 9 10 11 12 13 |
# File 'app/models/solidus_friendly_promotions/conditions/user_logged_in.rb', line 8 def eligible?(order, = {}) if order.user.blank? eligibility_errors.add(:base, (:no_user_specified), error_code: :no_user_specified) end eligibility_errors.empty? end |