diff options
author | Kasper Timm Hansen <kaspth@gmail.com> | 2017-06-07 22:17:34 +0200 |
---|---|---|
committer | Kasper Timm Hansen <kaspth@gmail.com> | 2017-06-08 21:42:46 +0200 |
commit | 8240636beda7b2b487217be1d945eb0d36145c4d (patch) | |
tree | f24476653fdb7dd0ed43bf602d7068af1a4b0dbc /actionview/lib/action_view/helpers/cache_helper.rb | |
parent | 2abf6ca0c8304a3cfcdae6e14060b561780be43c (diff) | |
download | rails-8240636beda7b2b487217be1d945eb0d36145c4d.tar.gz rails-8240636beda7b2b487217be1d945eb0d36145c4d.tar.bz2 rails-8240636beda7b2b487217be1d945eb0d36145c4d.zip |
Merge pull request https://github.com/rails/rails/pull/28637 from st0012/fix-partial-cache-logging
Diffstat (limited to 'actionview/lib/action_view/helpers/cache_helper.rb')
-rw-r--r-- | actionview/lib/action_view/helpers/cache_helper.rb | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/actionview/lib/action_view/helpers/cache_helper.rb b/actionview/lib/action_view/helpers/cache_helper.rb index dfa0956fe2..d515556e23 100644 --- a/actionview/lib/action_view/helpers/cache_helper.rb +++ b/actionview/lib/action_view/helpers/cache_helper.rb @@ -214,8 +214,6 @@ module ActionView end end - attr_reader :cache_hit # :nodoc: - private def fragment_name_with_digest(name, virtual_path) @@ -235,13 +233,11 @@ module ActionView end def fragment_for(name = {}, options = nil, &block) - # Some tests might using this helper without initialize actionview object - @cache_hit ||= {} if content = read_fragment_for(name, options) - @cache_hit[@virtual_path] = true + @view_renderer.cache_hits[@virtual_path] = :hit content else - @cache_hit[@virtual_path] = false + @view_renderer.cache_hits[@virtual_path] = :miss write_fragment_for(name, options, &block) end end |