solidus

https://github.com/solidusio/solidus

Ruby

🛒 Solidus, the open-source eCommerce framework for industry trailblazers.

Spree::Shipment#determine_state

Determines the appropriate +state+ according to the following logic:

canceled   if order is canceled
pending    unless order is complete and +order.payment_state+ is +paid+
shipped    if already shipped (ie. does not change the state)
ready      all other cases

Source | Google | Stack overflow

Edit

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

cd solidus

open core/app/models/spree/shipment.rb

Contribute

# Make a new branch

git checkout -b -your-name--update-docs-Spree--Shipment-determine_state-for-pr


# Commit to git

git add core/app/models/spree/shipment.rbgit commit -m "better docs for Spree::Shipment#determine_state"


# 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--Shipment-determine_state-for-pr

hub pull-request


# Celebrate!