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.Edit
git clone [email protected]:solidusio/solidus.git
cd solidus
open core/app/models/spree/stock/coordinator.rb
Contribute
# Make a new branchgit checkout -b -your-name--update-docs-Spree--Stock--Coordinator-stock_location_variant_ids-for-pr
# Commit to gitgit add core/app/models/spree/stock/coordinator.rbgit commit -m "better docs for Spree::Stock::Coordinator#stock_location_variant_ids"
# Open pull requestgem 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!