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)

Source | Google | Stack overflow

Edit

git clone [email protected]:solidusio/solidus.git

cd solidus

open legacy_promotions/app/models/spree/promotion.rb

Contribute

# Make a new branch

git checkout -b -your-name--update-docs-Spree--Promotion-eligible_rules-for-pr


# Commit to git

git add legacy_promotions/app/models/spree/promotion.rbgit commit -m "better docs for Spree::Promotion#eligible_rules"


# Open pull request

gem 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!