From 1bf178ee590c5ee7eba57f9b618ae4d9d6e2e704 Mon Sep 17 00:00:00 2001 From: Claire Date: Fri, 2 Oct 2026 11:41:07 +0000 Subject: [PATCH] Disable route reloading in Devise initialization (#40257) --- config/initializers/devise.rb | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/config/initializers/devise.rb b/config/initializers/devise.rb index 2047b091572..7cb4626ee2f 100644 --- a/config/initializers/devise.rb +++ b/config/initializers/devise.rb @@ -189,6 +189,12 @@ Devise.setup do |config| # from the server. You can disable this option at your own risk. # config.clean_up_csrf_token_on_authentication = true + # When false, Devise will not attempt to reload routes on eager load. + # This can reduce the time taken to boot the app but if your application + # requires the Devise mappings to be loaded during boot time the application + # won't boot properly. + config.reload_routes = false + # ==> Configuration for :database_authenticatable # For bcrypt, this is the cost for hashing the password and defaults to 10. If # using other encryptors, it sets how many times you want the password re-encrypted.