diff options
author | Pratik Naik <pratiknaik@gmail.com> | 2010-01-19 13:40:26 +0530 |
---|---|---|
committer | Pratik Naik <pratiknaik@gmail.com> | 2010-01-19 13:40:26 +0530 |
commit | c71120e29caddda295c133adfb279870733a3f81 (patch) | |
tree | da81981de36bc146c36cae3bc73cb5020ba05919 /railties/lib/rails/application.rb | |
parent | 087b67805e3785159cb4da524ad37782bd182b93 (diff) | |
parent | 71d67fc6bd504956bce66e274e6228dd00a814c1 (diff) | |
download | rails-c71120e29caddda295c133adfb279870733a3f81.tar.gz rails-c71120e29caddda295c133adfb279870733a3f81.tar.bz2 rails-c71120e29caddda295c133adfb279870733a3f81.zip |
Merge remote branch 'mainstream/master'
Diffstat (limited to 'railties/lib/rails/application.rb')
-rw-r--r-- | railties/lib/rails/application.rb | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/railties/lib/rails/application.rb b/railties/lib/rails/application.rb index c95316a4da..4d05f8115c 100644 --- a/railties/lib/rails/application.rb +++ b/railties/lib/rails/application.rb @@ -99,9 +99,15 @@ module Rails end end + def app + @app ||= begin + reload_routes! + middleware.build(routes) + end + end + def call(env) - @app ||= middleware.build(routes) - @app.call(env) + app.call(env) end initializer :load_application_initializers do @@ -110,6 +116,10 @@ module Rails end end + initializer :build_middleware_stack do + app + end + # Fires the user-supplied after_initialize block (Configuration#after_initialize) initializer :after_initialize do config.after_initialize_blocks.each do |block| |