#

In 

# :countless


:countless is an OFFSET paginator that avoids the COUNT query, reducing the number of queries per request by one.

Controller
@pagy, @records = pagy(:countless, collection, **options)
  • @pagy is the pagination instance. It provides the readers and the helpers to use in your code.
  • @records represents the eager-loaded Array of records for the page.
  • headless: true
    • Use this option when UI is unnecessary (e.g., for infinite scrolling) and/or to skip eager loading. In this scenario:
      • @pagy is incompatible with any helpers.
      • @records behaves like a standard collection.
      • The collection ends when @records.size < @pagy.limit.

See also Offset Options

See Offset Readers

Nav bar links beyond the last or highest visited page are not displayed.