Class: Spree::Promotion::Rules::Store
Instance Method Summary
collapse
#actionable?, #eligibility_errors, #to_partial_path
Instance Method Details
#applicable?(promotable) ⇒ Boolean
16
17
18
|
# File 'app/models/spree/promotion/rules/store.rb', line 16
def applicable?(promotable)
promotable.is_a?(Spree::Order)
end
|
#eligible?(order, _options = {}) ⇒ Boolean
20
21
22
|
# File 'app/models/spree/promotion/rules/store.rb', line 20
def eligible?(order, _options = {})
stores.none? || stores.include?(order.store)
end
|
#preload_relations ⇒ Object
12
13
14
|
# File 'app/models/spree/promotion/rules/store.rb', line 12
def preload_relations
[:stores]
end
|