diff options
author | Aaron Patterson <tenderlove@github.com> | 2019-02-13 08:27:05 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-02-13 08:27:05 -0800 |
commit | f22c6bbfe5f9bc308216c0e15a4986ae228d6ccf (patch) | |
tree | dda321ba9d1cbbec6b1396b09016f04544f0c790 /actionview/lib/action_view/helpers/rendering_helper.rb | |
parent | be099cc13f6d0240782d7d63bedd4814ad48fb2d (diff) | |
parent | 2b6d2d20374130da469ece24842ce3b681d3b788 (diff) | |
download | rails-f22c6bbfe5f9bc308216c0e15a4986ae228d6ccf.tar.gz rails-f22c6bbfe5f9bc308216c0e15a4986ae228d6ccf.tar.bz2 rails-f22c6bbfe5f9bc308216c0e15a4986ae228d6ccf.zip |
Merge pull request #35229 from rails/fix-35222
Convert lookup context's to a stack for fixing #35222 and #34138
Diffstat (limited to 'actionview/lib/action_view/helpers/rendering_helper.rb')
-rw-r--r-- | actionview/lib/action_view/helpers/rendering_helper.rb | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/actionview/lib/action_view/helpers/rendering_helper.rb b/actionview/lib/action_view/helpers/rendering_helper.rb index 1e12aa2736..7323963c72 100644 --- a/actionview/lib/action_view/helpers/rendering_helper.rb +++ b/actionview/lib/action_view/helpers/rendering_helper.rb @@ -27,10 +27,12 @@ module ActionView def render(options = {}, locals = {}, &block) case options when Hash - if block_given? - view_renderer.render_partial(self, options.merge(partial: options[:layout]), &block) - else - view_renderer.render(self, options) + in_context(options, locals) do |renderer| + if block_given? + view_renderer.render_partial(self, options.merge(partial: options[:layout]), &block) + else + view_renderer.render(self, options) + end end else view_renderer.render_partial(self, partial: options, locals: locals, &block) |