solidus

https://github.com/solidusio/solidus

Ruby

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

Spree::Stock::Coordinator#stock_location_variant_ids

This finds the variants we're looking for in each active stock location.
It returns a hash like:
  {
    <stock location> => <set of variant ids>,
    <stock location> => <set of variant ids>,
    ...,
  }
This is done in an awkward way for performance reasons.  It uses two
queries that are kept as performant as possible, and only loads the
minimum required ActiveRecord objects.

Source | Google | Stack overflow

Edit

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

cd solidus

open core/app/models/spree/stock/coordinator.rb

Contribute

# Make a new branch

git checkout -b -your-name--update-docs-Spree--Stock--Coordinator-stock_location_variant_ids-for-pr


# Commit to git

git add core/app/models/spree/stock/coordinator.rbgit commit -m "better docs for Spree::Stock::Coordinator#stock_location_variant_ids"


# 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--Stock--Coordinator-stock_location_variant_ids-for-pr

hub pull-request


# Celebrate!