diff options
author | José Valim <jose.valim@gmail.com> | 2010-02-19 08:02:28 +0100 |
---|---|---|
committer | José Valim <jose.valim@gmail.com> | 2010-02-19 08:15:49 +0100 |
commit | e49f94d71cdcdd3b891959e59203fd5e664c8add (patch) | |
tree | 84d0ec6beac626b8c42dd3a3730266805fe22f31 /railties/lib/rails/application/finisher.rb | |
parent | e2806929ec4bc3d429011039f4b046b600b7c8f8 (diff) | |
download | rails-e49f94d71cdcdd3b891959e59203fd5e664c8add.tar.gz rails-e49f94d71cdcdd3b891959e59203fd5e664c8add.tar.bz2 rails-e49f94d71cdcdd3b891959e59203fd5e664c8add.zip |
Revert behavior from a5684dfa3c16472bfa5d5d861ba78cb6dbadcb59 and ensure after_initializer is executed after to_prepare callbacks.
Diffstat (limited to 'railties/lib/rails/application/finisher.rb')
-rw-r--r-- | railties/lib/rails/application/finisher.rb | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/railties/lib/rails/application/finisher.rb b/railties/lib/rails/application/finisher.rb index afa79cad1c..cb38d5a5db 100644 --- a/railties/lib/rails/application/finisher.rb +++ b/railties/lib/rails/application/finisher.rb @@ -27,19 +27,16 @@ module Rails end end - # Fires the user-supplied after_initialize block (config.after_initialize) - # Should run before the middleware stack is built, because building the - # middleware already fires to_prepare callbacks in test and production. + initializer :build_middleware_stack do + app + end + initializer :after_initialize do config.after_initialize_blocks.each do |block| block.call(self) end end - initializer :build_middleware_stack do - app - end - # Disable dependency loading during request cycle initializer :disable_dependency_loading do if config.cache_classes && !config.dependency_loading |