aboutsummaryrefslogtreecommitdiffstats
path: root/actionview/lib/action_view/renderer/template_renderer.rb
diff options
context:
space:
mode:
authorRafael Mendonça França <rafaelmfranca@gmail.com>2015-08-24 15:16:59 -0300
committerRafael Mendonça França <rafaelmfranca@gmail.com>2015-08-24 15:16:59 -0300
commitface6042667c38fb8a372fa6f0bbfff88c4470f3 (patch)
tree25fb56ea7e945ccb7c995efa98591393a35dc2c4 /actionview/lib/action_view/renderer/template_renderer.rb
parentb58808ed6a36b2f0baf614df3aa679c6fac3f17a (diff)
downloadrails-face6042667c38fb8a372fa6f0bbfff88c4470f3.tar.gz
rails-face6042667c38fb8a372fa6f0bbfff88c4470f3.tar.bz2
rails-face6042667c38fb8a372fa6f0bbfff88c4470f3.zip
Pass formats to lookup_context
Before we were changing the state of the lookup_context for the duration of the with_layout_format block, but since we already know the formats we can just pass it explicitly. Related with 8d7ce0f22aee09d20091a4dc58cb379a09d13e26
Diffstat (limited to 'actionview/lib/action_view/renderer/template_renderer.rb')
-rw-r--r--actionview/lib/action_view/renderer/template_renderer.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/actionview/lib/action_view/renderer/template_renderer.rb b/actionview/lib/action_view/renderer/template_renderer.rb
index fac50bc58d..75217e1630 100644
--- a/actionview/lib/action_view/renderer/template_renderer.rb
+++ b/actionview/lib/action_view/renderer/template_renderer.rb
@@ -93,7 +93,7 @@ module ActionView
raise unless template_exists?(layout, nil, false, keys, all_details)
end
when Proc
- resolve_layout(layout.call, keys, formats)
+ resolve_layout(layout.call(formats), keys, formats)
else
layout
end