# Pagy initializer file (6.x) # Customize only what you really need and notice that the core Pagy works also without any of the following lines. # Should you just cherry pick part of this file, please maintain the require-order of the extras. # Extras # See https://ddnexus.github.io/pagy/extras # Backend Extras # Array extra: Paginate arrays # See https://ddnexus.github.io/pagy/extras/array # require 'pagy/extras/array' # Countless extra: Paginate without any count # See https://ddnexus.github.io/pagy/extras/countless # require 'pagy/extras/countless' # Metadata extra: Provides the pagination metadata to Javascript frameworks # See https://ddnexus.github.io/pagy/extras/metadata require "pagy/extras/metadata" # Items extra: Allow the client to request a custom number of items per page # See https://ddnexus.github.io/pagy/extras/items # require 'pagy/extras/items' # Overflow extra: Allow for easy handling of overflowing pages # See https://ddnexus.github.io/pagy/extras/overflow require "pagy/extras/overflow" Pagy::DEFAULT[:overflow] = :last_page # Default configuration Pagy::DEFAULT[:items] = 20 Pagy::DEFAULT[:max_items] = 100