From df44df945d6315238e7d94d9bdef82e435dc9b24 Mon Sep 17 00:00:00 2001 From: Joshua Peek Date: Sun, 8 Jun 2008 22:31:54 -0500 Subject: [PATCH] Ensure ActionView::TemplateFinder view cache is rebuilt on initialize. --- actionpack/CHANGELOG | 2 ++ actionpack/lib/action_controller/dispatcher.rb | 5 ++++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/actionpack/CHANGELOG b/actionpack/CHANGELOG index 3096716dba..f9cb715400 100644 --- a/actionpack/CHANGELOG +++ b/actionpack/CHANGELOG @@ -1,5 +1,7 @@ *Edge* +* Ensure ActionView::TemplateFinder view cache is rebuilt on initialize [Josh Peek] + * Drop ActionController::Base.allow_concurrency flag [Josh Peek] * More efficient concat and capture helpers. Remove ActionView::Base.erb_variable. [Jeremy Kemper] diff --git a/actionpack/lib/action_controller/dispatcher.rb b/actionpack/lib/action_controller/dispatcher.rb index fe4f6b4a7e..64553fb25d 100644 --- a/actionpack/lib/action_controller/dispatcher.rb +++ b/actionpack/lib/action_controller/dispatcher.rb @@ -10,6 +10,10 @@ module ActionController # Development mode callbacks before_dispatch :reload_application after_dispatch :cleanup_application + + to_prepare :reload_view_path_cache do + ActionView::TemplateFinder.reload! unless ActionView::Base.cache_template_loading + end end # Common callbacks @@ -134,7 +138,6 @@ module ActionController run_callbacks :prepare_dispatch Routing::Routes.reload - ActionView::TemplateFinder.reload! unless ActionView::Base.cache_template_loading end # Cleanup the application by clearing out loaded classes so they can