Fixed usage of cache_template_loading
It disables recompilation of templates on every request in test env.
This commit is contained in:
parent
057c8f257d
commit
238035409e
@ -1,3 +1,11 @@
|
|||||||
|
* Use `ActionView::Resolver.caching?` (`config.action_view.cache_template_loading`)
|
||||||
|
to enable template recompilation.
|
||||||
|
|
||||||
|
Before it was enabled by `consider_all_requests_local`, which caused
|
||||||
|
recompilation in tests.
|
||||||
|
|
||||||
|
*Max Melentiev*
|
||||||
|
|
||||||
* Add `form_with` to unify `form_tag` and `form_for` usage.
|
* Add `form_with` to unify `form_tag` and `form_for` usage.
|
||||||
|
|
||||||
Used like `form_tag` (where just the open tag is output):
|
Used like `form_tag` (where just the open tag is output):
|
||||||
|
@ -39,7 +39,7 @@ class Railtie < Rails::Engine # :nodoc:
|
|||||||
|
|
||||||
initializer "action_view.per_request_digest_cache" do |app|
|
initializer "action_view.per_request_digest_cache" do |app|
|
||||||
ActiveSupport.on_load(:action_view) do
|
ActiveSupport.on_load(:action_view) do
|
||||||
if app.config.consider_all_requests_local
|
unless ActionView::Resolver.caching?
|
||||||
app.executor.to_run ActionView::Digestor::PerExecutionDigestCacheExpiry
|
app.executor.to_run ActionView::Digestor::PerExecutionDigestCacheExpiry
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user