solidus

https://github.com/solidusio/solidus

Ruby

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

Spree::Core::Search::Variant#results

Searches the variants table using the ransack 'search_terms' defined on the class.
Each word of the query string is searched individually, matching by a union of the ransack
search terms, then we find the intersection of those queries, ensuring that each word matches
one of the rules.

== Returns:
ActiveRecord::Relation of variants

Source | Google | Stack overflow

Edit

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

cd solidus

open core/lib/spree/core/search/variant.rb

Contribute

# Make a new branch

git checkout -b -your-name--update-docs-Spree--Core--Search--Variant-results-for-pr


# Commit to git

git add core/lib/spree/core/search/variant.rbgit commit -m "better docs for Spree::Core::Search::Variant#results"


# 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--Core--Search--Variant-results-for-pr

hub pull-request


# Celebrate!