Skip to content

Instantly share code, notes, and snippets.

@prismicdeveloper
Created March 31, 2015 09:44
Show Gist options
  • Save prismicdeveloper/f987025745dbbf26e817 to your computer and use it in GitHub Desktop.
Save prismicdeveloper/f987025745dbbf26e817 to your computer and use it in GitHub Desktop.
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