aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_view/template/resolver.rb
diff options
context:
space:
mode:
authorXavier Noria <fxn@hashref.com>2010-03-31 07:47:58 -0700
committerXavier Noria <fxn@hashref.com>2010-03-31 07:47:58 -0700
commit824fa10f4d1306cc1e310a7d5de7e95cfb07d6f8 (patch)
tree1967c2a945d6e131d467fb4f0178a0f60e01ae8a /actionpack/lib/action_view/template/resolver.rb
parent1ed1652bef981d9402797b6cb9f0920a40eea21a (diff)
parentdb28d407f76a790a31e27bf51560e23425dd6944 (diff)
downloadrails-824fa10f4d1306cc1e310a7d5de7e95cfb07d6f8.tar.gz
rails-824fa10f4d1306cc1e310a7d5de7e95cfb07d6f8.tar.bz2
rails-824fa10f4d1306cc1e310a7d5de7e95cfb07d6f8.zip
Merge commit 'rails/master'
Diffstat (limited to 'actionpack/lib/action_view/template/resolver.rb')
-rw-r--r--actionpack/lib/action_view/template/resolver.rb7
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