From 5ef2b089f03271fcff02280fdcbb12d38d726eba Mon Sep 17 00:00:00 2001 From: Rick Olson Date: Sat, 2 Feb 2008 20:18:18 +0000 Subject: Reshuffle load order so that routes and observers are initialized after plugins and app initializers. Closes #10980 [rick, fxn] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8787 5ecf4fe2-1ee6-0310-87b1-e25e094e27de --- railties/CHANGELOG | 2 ++ railties/lib/initializer.rb | 12 ++++++------ 2 files changed, 8 insertions(+), 6 deletions(-) (limited to 'railties') diff --git a/railties/CHANGELOG b/railties/CHANGELOG index f37702e380..e4a0a98d37 100644 --- a/railties/CHANGELOG +++ b/railties/CHANGELOG @@ -1,5 +1,7 @@ *SVN* +* Reshuffle load order so that routes and observers are initialized after plugins and app initializers. Closes #10980 [rick] + * Git support for script/generate. #10690 [ssoroka] * Update scaffold to use labels instead of bold tags. Closes #10757 [zach-inglis-lt3] diff --git a/railties/lib/initializer.rb b/railties/lib/initializer.rb index 899688b559..2a60ea2f56 100644 --- a/railties/lib/initializer.rb +++ b/railties/lib/initializer.rb @@ -87,16 +87,16 @@ module Rails load_plugins - # Observers are loaded after plugins in case Observers or observed models are modified by plugins. - load_observers - - # Routing must be initialized after plugins to allow the former to extend the routes - initialize_routing - # the framework is now fully initialized after_initialize load_application_initializers + + # Routing must be initialized after plugins to allow the former to extend the routes + initialize_routing + + # Observers are loaded after plugins in case Observers or observed models are modified by plugins. + load_observers end # Check for valid Ruby version -- cgit v1.2.3