Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Make sure cache_template_loading works and don't use to_prepare callback

  • Loading branch information...
commit f728e57d2204a429f5282856ec89d4e047e72957 1 parent 3f59429
@lifo lifo authored
View
2  actionpack/CHANGELOG
@@ -1,7 +1,5 @@
*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]
View
5 actionpack/lib/action_controller/dispatcher.rb
@@ -21,10 +21,6 @@ def define_dispatcher_callbacks(cache_classes)
end
end
- to_prepare :reload_view_path_cache do
- ActionView::TemplateFinder.reload!
- end
-
if defined?(ActiveRecord)
before_dispatch { ActiveRecord::Base.verify_active_connections! }
to_prepare(:activerecord_instantiate_observers) { ActiveRecord::Base.instantiate_observers }
@@ -138,6 +134,7 @@ def reload_application
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
View
1  actionpack/lib/action_view/template.rb
@@ -99,6 +99,7 @@ def raise_missing_template_exception
# return the rendered template as a string.
def self.register_template_handler(extension, klass)
@@template_handlers[extension.to_sym] = klass
+ ActionView::TemplateFinder.reload!
end
def self.template_handler_extensions
Please sign in to comment.
Something went wrong with that request. Please try again.