Module: Chewy::Search::Pagination::Kaminari

Extended by:
ActiveSupport::Concern
Defined in:
lib/chewy/search/pagination/kaminari.rb

Overview

This module provides Kaminari support for Request It is included automatically if Kaminari is available.

Examples:

PlacesIndex.all.page(3).per(10).order(:name)
# => <PlacesIndex::Query {..., :body=>{:size=>10, :from=>20, :sort=>["name"]}}>

Instance Method Summary collapse

Instance Method Details

#limit_valueObject



25
26
27
# File 'lib/chewy/search/pagination/kaminari.rb', line 25

def limit_value
  (raw_limit_value || default_per_page).to_i
end

#offset_valueObject



29
30
31
# File 'lib/chewy/search/pagination/kaminari.rb', line 29

def offset_value
  raw_offset_value.to_i
end