diff options
author | Jon Moss <me@jonathanmoss.me> | 2016-05-16 17:56:37 -0400 |
---|---|---|
committer | Jon Moss <me@jonathanmoss.me> | 2016-05-16 17:56:37 -0400 |
commit | 7aedae6de58195efb1e2d79af212d1c7290f2f73 (patch) | |
tree | 3b92b57c6225d3ae5e5b23abad86e24439ecc7c5 /actionview/lib | |
parent | 1e791705dcea650a034b7ccb4d922f455648202d (diff) | |
download | rails-7aedae6de58195efb1e2d79af212d1c7290f2f73.tar.gz rails-7aedae6de58195efb1e2d79af212d1c7290f2f73.tar.bz2 rails-7aedae6de58195efb1e2d79af212d1c7290f2f73.zip |
[Action View] Don't create middleman `DetailsKey` instance
All of this is `nodoc`'ed, so we shouldn't have to worry about breaking
changes, if there are any -- all internal API :).
Diffstat (limited to 'actionview/lib')
-rw-r--r-- | actionview/lib/action_view/lookup_context.rb | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/actionview/lib/action_view/lookup_context.rb b/actionview/lib/action_view/lookup_context.rb index 626c4b8f5e..9db1460ee7 100644 --- a/actionview/lib/action_view/lookup_context.rb +++ b/actionview/lib/action_view/lookup_context.rb @@ -63,7 +63,7 @@ module ActionView details = details.dup details[:formats] &= Template::Types.symbols end - @details_keys[details] ||= new + @details_keys[details] ||= Concurrent::Map.new end def self.clear @@ -71,13 +71,7 @@ module ActionView end def self.digest_caches - @details_keys.values.map(&:digest_cache) - end - - attr_reader :digest_cache - - def initialize - @digest_cache = Concurrent::Map.new + @details_keys.values end end @@ -236,7 +230,7 @@ module ActionView end def digest_cache - details_key.digest_cache + details_key end def initialize_details(target, details) |