aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_controller
diff options
context:
space:
mode:
authorJoshua Peek <josh@joshpeek.com>2008-06-08 22:31:54 -0500
committerJoshua Peek <josh@joshpeek.com>2008-06-08 22:31:54 -0500
commitdf44df945d6315238e7d94d9bdef82e435dc9b24 (patch)
treea260d8ac4d7eefaf71586f9aa7736ee9e44859c6 /actionpack/lib/action_controller
parent0c9281e82140f3a69e4473b3bcefd5ccebd79e2d (diff)
downloadrails-df44df945d6315238e7d94d9bdef82e435dc9b24.tar.gz
rails-df44df945d6315238e7d94d9bdef82e435dc9b24.tar.bz2
rails-df44df945d6315238e7d94d9bdef82e435dc9b24.zip
Ensure ActionView::TemplateFinder view cache is rebuilt on initialize.
Diffstat (limited to 'actionpack/lib/action_controller')
-rw-r--r--actionpack/lib/action_controller/dispatcher.rb5
1 files changed, 4 insertions, 1 deletions
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