From de99fa8a2dbbba56a9ada44d911003eae49ae4f3 Mon Sep 17 00:00:00 2001 From: zaziemo Date: Mon, 5 Feb 2024 21:28:59 +0100 Subject: [PATCH] Change default behaviour of pagy overflow to :empty_page to prevent the last page always showing up when bots crawl page numbers that do not exist. [#1346] --- config/initializers/pagy.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/initializers/pagy.rb b/config/initializers/pagy.rb index 1d881ba66..8159be40c 100644 --- a/config/initializers/pagy.rb +++ b/config/initializers/pagy.rb @@ -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