diff options
author | Matthew Draper <matthew@trebex.net> | 2016-12-08 01:29:54 +1030 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-12-08 01:29:54 +1030 |
commit | 42b873f2d88f86a92341dd9f6e09874b957d1b4a (patch) | |
tree | 89f496fd8d9d2e967ffb7455e792cab59aec0213 /actionview | |
parent | ab2483c72a60755d5eeeb1d93bf26cd383c68379 (diff) | |
parent | 238035409ec0c5180b59cfbcd50cdf9a605e37cf (diff) | |
download | rails-42b873f2d88f86a92341dd9f6e09874b957d1b4a.tar.gz rails-42b873f2d88f86a92341dd9f6e09874b957d1b4a.tar.bz2 rails-42b873f2d88f86a92341dd9f6e09874b957d1b4a.zip |
Merge pull request #27271 from printercu/permantent_digest_in_tests
Don't clear digest cache in test environment
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 |