Class: SolidusFriendlyPromotions::Conditions::Store

Inherits:
SolidusFriendlyPromotions::Condition show all
Includes:
OrderLevelCondition
Defined in:
app/models/solidus_friendly_promotions/conditions/store.rb

Instance Method Summary collapse

Methods included from OrderLevelCondition

#applicable?, #level

Methods inherited from SolidusFriendlyPromotions::Condition

#applicable?, #eligibility_errors, #level, #to_partial_path

Instance Method Details

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

Returns:

  • (Boolean)


17
18
19
# File 'app/models/solidus_friendly_promotions/conditions/store.rb', line 17

def eligible?(order, _options = {})
  stores.none? || stores.include?(order.store)
end

#preload_relationsObject



13
14
15
# File 'app/models/solidus_friendly_promotions/conditions/store.rb', line 13

def preload_relations
  [:stores]
end

#updateable?Boolean

Returns:

  • (Boolean)


21
22
23
# File 'app/models/solidus_friendly_promotions/conditions/store.rb', line 21

def updateable?
  true
end