diff --git a/railties/lib/initializer.rb b/railties/lib/initializer.rb index e36f917b15..ea61d4e4fe 100644 --- a/railties/lib/initializer.rb +++ b/railties/lib/initializer.rb @@ -135,12 +135,12 @@ module Rails load_application_initializers - # Prepare dispatcher callbacks and run 'prepare' callbacks - prepare_dispatcher - # the framework is now fully initialized after_initialize + # Prepare dispatcher callbacks and run 'prepare' callbacks + prepare_dispatcher + # Routing must be initialized after plugins to allow the former to extend the routes initialize_routing