From 6b21c0f402562f38ac1c59d8b37966435035fb41 Mon Sep 17 00:00:00 2001 From: Echo Date: Sat, 15 Nov 2025 18:34:28 -0500 Subject: [PATCH] upgrade pagy (#628) --- Gemfile | 2 ++ Gemfile.lock | 5 ++++- config/initializers/ahoy_captain_pagy_patch.rb | 10 ++++++++++ 3 files changed, 16 insertions(+), 1 deletion(-) create mode 100644 config/initializers/ahoy_captain_pagy_patch.rb diff --git a/Gemfile b/Gemfile index e678579..4cb2d11 100644 --- a/Gemfile +++ b/Gemfile @@ -90,6 +90,8 @@ gem "ahoy_matey" gem "geocoder" gem "ahoy_captain", git: "https://github.com/johnmcdowall/ahoy_captain.git", branch: "fix_importmaps" +gem "pagy", "~> 43.0" + # Airtable syncing gem "norairrecord", "~> 0.4.1" diff --git a/Gemfile.lock b/Gemfile.lock index 34ca206..587085a 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -323,7 +323,9 @@ GEM faraday-net_http_persistent net-http-persistent ostruct (0.6.3) - pagy (9.4.0) + pagy (43.0.6) + json + yaml paper_trail (17.0.0) activerecord (>= 7.1) request_store (~> 1.4) @@ -601,6 +603,7 @@ DEPENDENCIES letter_opener_web (~> 3.0) memory_profiler norairrecord (~> 0.4.1) + pagy (~> 43.0) paper_trail pg propshaft diff --git a/config/initializers/ahoy_captain_pagy_patch.rb b/config/initializers/ahoy_captain_pagy_patch.rb new file mode 100644 index 0000000..e5e8430 --- /dev/null +++ b/config/initializers/ahoy_captain_pagy_patch.rb @@ -0,0 +1,10 @@ +# pagy did a massive update, reworked a bunch of shit, but ahoy-captain is still using the old API +# this is a fuck ass workaround to update the version of pagy but not make ahoy-captain crash and burn builds +# https://github.com/ddnexus/pagy/releases/tag/v43.0.0 + +class Pagy + module Frontend + # null + end + Backend = Method unless const_defined?(:Backend) +end