From 5bd7c0af3993a5dec277e56730b86b3eef637069 Mon Sep 17 00:00:00 2001 From: Domizio Demichelis Date: Sat, 9 Mar 2019 11:36:35 +0700 Subject: [PATCH] updated docs notes for the searchkick and elasticsearch_rails extras --- docs/extras/elasticsearch_rails.md | 2 +- docs/extras/searchkick.md | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/extras/elasticsearch_rails.md b/docs/extras/elasticsearch_rails.md index 563317a3b..3d91b6964 100644 --- a/docs/extras/elasticsearch_rails.md +++ b/docs/extras/elasticsearch_rails.md @@ -56,7 +56,7 @@ This constructor accepts an `Elasticsearch::Model::Response::Response` as the fi @pagy = Pagy.new_from_elasticsearch_rails(@response, ...) ``` -**Notice**: you have to take care of managing all the params manually. If you prefer to manage the pagination automatically, see below. +**Notice**: you have to take care of manually manage all the params for your search, however the method extracts/calculates the `:items`, `:page` and `:count` from the response object, so you don't need to pass that again. If you prefer to manage the pagination automatically, see below. ## Pagy::Search diff --git a/docs/extras/searchkick.md b/docs/extras/searchkick.md index 676005d29..bb8b7981d 100644 --- a/docs/extras/searchkick.md +++ b/docs/extras/searchkick.md @@ -49,14 +49,14 @@ This extra is composed of 1 file: ## Pagy.new_from_searchkick -This constructor accepts an `Searchkick::Results` as the first argument, plus the usual optional variable hash. It sets the `:items`, `:page` and `:count` pagy variables extracted/calculated out of the `Searchkick::Results` object. +This constructor accepts a `Searchkick::Results` as the first argument, plus the usual optional variable hash. It sets the `:items`, `:page` and `:count` pagy variables extracted/calculated out of the `Searchkick::Results` object. ```ruby @results = Model.search('*', page: 2; per_page: 10, ...) @pagy = Pagy.new_from_searchkick(@results, ...) ``` -**Notice**: you have to take care of managing all the params manually. If you prefer to manage the pagination automatically, see below. +**Notice**: you have to take care of manually manage all the params for your search, however the method extracts the `:items`, `:page` and `:count` from the results object, so you don't need to pass that again. If you prefer to manage the pagination automatically, see below. ## Pagy::Search