Skip to content

Commit

Permalink
Change default behaviour of pagy overflow
Browse files Browse the repository at this point in the history
to :empty_page to prevent the last page always showing up when
bots crawl page numbers that do not exist.

[#1346]
  • Loading branch information
zaziemo committed Feb 5, 2024
1 parent 6c0c17c commit de99fa8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion config/initializers/pagy.rb
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@
# Overflow extra: Allow for easy handling of overflowing pages
# See https://ddnexus.github.io/pagy/docs/extras/overflow
require 'pagy/extras/overflow'
Pagy::DEFAULT[:overflow] = :last_page # (other options: :empty_page and :exception)
Pagy::DEFAULT[:overflow] = :empty_page # (other options: :last_page, :empty_page and :exception)

# Support extra: Extra support for features like: incremental, infinite, auto-scroll pagination
# See https://ddnexus.github.io/pagy/docs/extras/support
Expand Down

0 comments on commit de99fa8

Please sign in to comment.