mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Merge pull request #27271 from printercu/permantent_digest_in_tests
Don't clear digest cache in test environment
This commit is contained in:
commit
42b873f2d8
2 changed files with 9 additions and 1 deletions
|
@ -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 @@ module ActionView
|
||||||
|
|
||||||
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 a new issue