Module: Pagy::SearchkickExtra::ModelExtension
- Defined in:
- lib/pagy/extras/searchkick.rb
Overview
:nodoc:
Instance Method Summary collapse
-
#pagy_searchkick(term = '*', **options, &block) ⇒ Object
Return an array used to delay the call of #search after the pagination variables are merged to the options.
Instance Method Details
#pagy_searchkick(term = '*', **options, &block) ⇒ 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 optional method call.
14 15 16 17 18 |
# File 'lib/pagy/extras/searchkick.rb', line 14 def pagy_searchkick(term = '*', **, &block) [self, term, , block].tap do |args| args.define_singleton_method(:method_missing) { |*a| args += a } end end |