solidus
https://github.com/solidusio/solidus
Ruby
🛒 Solidus, the open-source eCommerce framework for industry trailblazers.
Spree::Promotion#eligible_rules
eligible_rules returns an array of promotion rules where eligible? is true for the promotable if there are no such rules, an empty array is returned if the rules make this promotable ineligible, then nil is returned (i.e. this promotable is not eligible)
Edit
git clone [email protected]:solidusio/solidus.git
cd solidus
open legacy_promotions/app/models/spree/promotion.rb
Contribute
# Make a new branchgit checkout -b -your-name--update-docs-Spree--Promotion-eligible_rules-for-pr
# Commit to gitgit add legacy_promotions/app/models/spree/promotion.rbgit commit -m "better docs for Spree::Promotion#eligible_rules"
# Open pull requestgem install hub # on a mac you can `brew install hub`
hub fork
git push <your name> -your-name--update-docs-Spree--Promotion-eligible_rules-for-pr
hub pull-request
# Celebrate!