Module: Pagy::SearchkickExtra::Pagy
- Included in:
- Pagy
- Defined in:
- lib/pagy/extras/searchkick.rb
Overview
Additions for the Pagy class
Instance Method Summary collapse
-
#new_from_searchkick(results, vars = {}) ⇒ Object
Create a Pagy object from a Searchkick::Results object.
Instance Method Details
#new_from_searchkick(results, vars = {}) ⇒ Object
Create a Pagy object from a Searchkick::Results object
25 26 27 28 29 30 |
# File 'lib/pagy/extras/searchkick.rb', line 25 def new_from_searchkick(results, vars = {}) vars[:items] = results.[:per_page] vars[:page] = results.[:page] vars[:count] = results.total_count new(vars) end |