module Pagy::ElasticsearchRails

Public Instance Methods

pagy_elasticsearch_rails(query_or_payload, **options) click to toggle source

returns an array used to delay the call of search after the pagination variables are merged to the options it also pushes to the same array an eventually called method

# File lib/pagy/extras/elasticsearch_rails.rb, line 12
def pagy_elasticsearch_rails(query_or_payload, **options)
  [self, query_or_payload, options].tap do |args|
    args.define_singleton_method(:method_missing){|*a| args += a}
  end
end