Created
March 31, 2015 09:44
-
-
Save prismicdeveloper/f987025745dbbf26e817 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
api = Prismic.api('https://lesbonneschoses.cdn.prismic.io/api') | |
response = api.form('everything') | |
.ref(api.master_ref) | |
.query(Prismic::Predicates::at('document.type', 'product')) | |
.page_size(100) | |
.orderings('[my.product.price desc]') | |
.submit | |
# The products are now ordered by price, highest first | |
results = response.results |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment