aboutsummaryrefslogtreecommitdiffstats
path: root/actionview/lib/action_view/renderer
diff options
context:
space:
mode:
authorAaron Patterson <aaron.patterson@gmail.com>2016-05-17 11:28:40 -0700
committerAaron Patterson <aaron.patterson@gmail.com>2016-05-17 11:28:51 -0700
commitd6bac046922fcee05366d26d75349dde70d25f6b (patch)
tree486bad10a28c4b93bbde0482f3bb6217d0a3e516 /actionview/lib/action_view/renderer
parent17f04e446a6b3d5ca457e9666e06ee4eccdfa9c2 (diff)
downloadrails-d6bac046922fcee05366d26d75349dde70d25f6b.tar.gz
rails-d6bac046922fcee05366d26d75349dde70d25f6b.tar.bz2
rails-d6bac046922fcee05366d26d75349dde70d25f6b.zip
keep layouts + locals from bloating the cache
Using locals will cause layouts to be cached multiple times in the template cache. This commit removes locals from consideration when looking up the layout.
Diffstat (limited to 'actionview/lib/action_view/renderer')
-rw-r--r--actionview/lib/action_view/renderer/template_renderer.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/actionview/lib/action_view/renderer/template_renderer.rb b/actionview/lib/action_view/renderer/template_renderer.rb
index 9d15bbfca7..1d6afb90fe 100644
--- a/actionview/lib/action_view/renderer/template_renderer.rb
+++ b/actionview/lib/action_view/renderer/template_renderer.rb
@@ -84,13 +84,13 @@ module ActionView
when String
begin
if layout =~ /^\//
- with_fallbacks { find_template(layout, nil, false, keys, details) }
+ with_fallbacks { find_template(layout, nil, false, [], details) }
else
- find_template(layout, nil, false, keys, details)
+ find_template(layout, nil, false, [], details)
end
rescue ActionView::MissingTemplate
all_details = @details.merge(:formats => @lookup_context.default_formats)
- raise unless template_exists?(layout, nil, false, keys, all_details)
+ raise unless template_exists?(layout, nil, false, [], all_details)
end
when Proc
resolve_layout(layout.call(formats), keys, formats)