Class: AlgoliaSearch::Pagination::WillPaginate

Inherits:
Object
  • Object
show all
Defined in:
lib/algoliasearch/pagination/will_paginate.rb

Class Method Summary collapse

Class Method Details

.create(results, total_hits, options = {}) ⇒ Object



10
11
12
# File 'lib/algoliasearch/pagination/will_paginate.rb', line 10

def self.create(results, total_hits, options = {})
  ::WillPaginate::Collection.create(options[:page], options[:per_page], total_hits) { |pager| pager.replace results }
end