Method: Spree::Adjustment#calculate_eligibility
- Defined in:
- app/models/spree/adjustment.rb
#calculate_eligibility ⇒ true, false
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Calculates based on attached promotion (if this is a promotion adjustment) whether this promotion is still eligible.
138 139 140 141 142 143 144 |
# File 'app/models/spree/adjustment.rb', line 138 def calculate_eligibility if !finalized? && source && promotion? source.promotion.eligible?(adjustable, promotion_code: promotion_code) else eligible? end end |