diff options
author | Max Melentiev <melentievm@gmail.com> | 2016-12-05 21:30:27 +0300 |
---|---|---|
committer | Max Melentiev <melentievm@gmail.com> | 2016-12-06 23:36:47 +0300 |
commit | 238035409ec0c5180b59cfbcd50cdf9a605e37cf (patch) | |
tree | 1042fc2b74c4ab6fbb30a9eb1109274a64817b96 /actionview | |
parent | 057c8f257d57f99a6bb80c59429cac2aab3422da (diff) | |
download | rails-238035409ec0c5180b59cfbcd50cdf9a605e37cf.tar.gz rails-238035409ec0c5180b59cfbcd50cdf9a605e37cf.tar.bz2 rails-238035409ec0c5180b59cfbcd50cdf9a605e37cf.zip |
Fixed usage of cache_template_loading
It disables recompilation of templates on every request in test env.
Diffstat (limited to 'actionview')
-rw-r--r-- | actionview/CHANGELOG.md | 8 | ||||
-rw-r--r-- | actionview/lib/action_view/railtie.rb | 2 |
2 files changed, 9 insertions, 1 deletions
diff --git a/actionview/CHANGELOG.md b/actionview/CHANGELOG.md index 558659dd77..8da2e4ae1d 100644 --- a/actionview/CHANGELOG.md +++ b/actionview/CHANGELOG.md @@ -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. Used like `form_tag` (where just the open tag is output): diff --git a/actionview/lib/action_view/railtie.rb b/actionview/lib/action_view/railtie.rb index ae72cea404..d344d98f4b 100644 --- a/actionview/lib/action_view/railtie.rb +++ b/actionview/lib/action_view/railtie.rb @@ -39,7 +39,7 @@ module ActionView initializer "action_view.per_request_digest_cache" do |app| ActiveSupport.on_load(:action_view) do - if app.config.consider_all_requests_local + unless ActionView::Resolver.caching? app.executor.to_run ActionView::Digestor::PerExecutionDigestCacheExpiry end end |