diff options
Diffstat (limited to 'actionpack')
-rw-r--r-- | actionpack/lib/action_view/template/resolver.rb | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/actionpack/lib/action_view/template/resolver.rb b/actionpack/lib/action_view/template/resolver.rb index 8e8afaa43f..a223b3a55f 100644 --- a/actionpack/lib/action_view/template/resolver.rb +++ b/actionpack/lib/action_view/template/resolver.rb @@ -35,12 +35,7 @@ module ActionView def cached(key, prefix, name, partial) return yield unless key && caching? - scope = @cached[key][prefix][name] - if scope.key?(partial) - scope[partial] - else - scope[partial] = yield - end + @cached[key][prefix][name][partial] ||= yield end end |