mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Make sure cache_template_loading works and don't use to_prepare callback
This commit is contained in:
parent
3f594299c8
commit
f728e57d22
3 changed files with 2 additions and 6 deletions
|
@ -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]
|
||||
|
|
|
@ -21,10 +21,6 @@ module ActionController
|
|||
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 @@ 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
|
||||
|
|
|
@ -99,6 +99,7 @@ module ActionView #:nodoc:
|
|||
# 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
|
||||
|
|
Loading…
Reference in a new issue