solidus
https://github.com/solidusio/solidus
Ruby
🛒 Solidus, the open-source eCommerce framework for industry trailblazers.
Spree::Promotion::Actions::CreateItemAdjustments#promotion_credit_exists?
Tells us if there if the specified promotion is already associated with the line item regardless of whether or not its currently eligible. Useful because generally you would only want a promotion action to apply to line item no more than once. Receives an adjustment +source+ (here a PromotionAction object) and tells if the order has adjustments from that already
Edit
git clone [email protected]:solidusio/solidus.git
cd solidus
open legacy_promotions/app/models/spree/promotion/actions/create_item_adjustments.rb
Contribute
# Make a new branchgit checkout -b -your-name--update-docs-Spree--Promotion--Actions--CreateItemAdjustments-promotion_credit_exists--for-pr
# Commit to gitgit add legacy_promotions/app/models/spree/promotion/actions/create_item_adjustments.rbgit commit -m "better docs for Spree::Promotion::Actions::CreateItemAdjustments#promotion_credit_exists?"
# 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--Actions--CreateItemAdjustments-promotion_credit_exists--for-pr
hub pull-request
# Celebrate!