aboutsummaryrefslogtreecommitdiffstats
path: root/railties/lib/rails/application/finisher.rb
diff options
context:
space:
mode:
Diffstat (limited to 'railties/lib/rails/application/finisher.rb')
-rw-r--r--railties/lib/rails/application/finisher.rb2
1 files changed, 2 insertions, 0 deletions
diff --git a/railties/lib/rails/application/finisher.rb b/railties/lib/rails/application/finisher.rb
index a45b61c99c..bf865ce466 100644
--- a/railties/lib/rails/application/finisher.rb
+++ b/railties/lib/rails/application/finisher.rb
@@ -53,6 +53,8 @@ module Rails
end
# Force routes to be loaded just at the end and add it to to_prepare callbacks
+ # This needs to be after the finisher hook to ensure routes added in the hook
+ # are still loaded.
initializer :set_routes_reloader do |app|
reloader = lambda { app.routes_reloader.execute_if_updated }
reloader.call