From 0da471be9190d09b59c6313fe8d2d16b6cb2a08f Mon Sep 17 00:00:00 2001 From: Nat Dean-Lewis Date: Tue, 28 Jul 2026 16:48:09 +0100 Subject: [PATCH] docs: clarify devise 2fa rails8 patch --- .../devise_two_factor_authentication_rails8_patch.rb | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/config/initializers/devise_two_factor_authentication_rails8_patch.rb b/config/initializers/devise_two_factor_authentication_rails8_patch.rb index a3dc8d910..c60fd5b91 100644 --- a/config/initializers/devise_two_factor_authentication_rails8_patch.rb +++ b/config/initializers/devise_two_factor_authentication_rails8_patch.rb @@ -5,13 +5,7 @@ # The gem's route mapper passes the non-standard :resend_code action into # `resource ... only: [...]`. Rails 8.1 tightened `resource`/`resources` to raise # an ArgumentError when :only/:except contain anything outside the standard REST -# actions, so route drawing blows up before the app can boot. -# -# The `resend_code` route is actually created by the `collection { ... }` block -# inside the resource, so listing :resend_code in :only was always a no-op. -# We redefine the mapper method to drop it, leaving behaviour identical. -# -# Remove this file if the gem publishes a Rails 8.1-compatible release. +# actions. So, we redefine the mapper method to drop it now we are on Rails 8.1+. module ActionDispatch::Routing class Mapper protected