Module: Pagy::ElasticsearchRailsExtra::ElasticsearchRails
- Defined in:
- lib/pagy/extras/elasticsearch_rails.rb
Instance Method Summary collapse
-
#pagy_elasticsearch_rails(query_or_payload, **options) ⇒ Object
Return 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.
Instance Method Details
#pagy_elasticsearch_rails(query_or_payload, **options) ⇒ Object
Return 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
24 25 26 27 28 |
# File 'lib/pagy/extras/elasticsearch_rails.rb', line 24 def pagy_elasticsearch_rails(query_or_payload, **) [self, query_or_payload, ].tap do |args| args.define_singleton_method(:method_missing) { |*a| args += a } end end |