diff options
author | Eileen M. Uchitelle <eileencodes@users.noreply.github.com> | 2017-12-11 08:08:03 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-12-11 08:08:03 -0500 |
commit | 4edce566ad13d54c86637caf56750df0d6dc7b1a (patch) | |
tree | ab83ebd5ba664a742e87731f022aed9a04507837 /actionview/lib/action_view/renderer/streaming_template_renderer.rb | |
parent | a41fa1fae035124978c6dff07fbc500b82aa46ee (diff) | |
parent | 6d3b57fe423e18d61ae457a718c0f9901a173ace (diff) | |
download | rails-4edce566ad13d54c86637caf56750df0d6dc7b1a.tar.gz rails-4edce566ad13d54c86637caf56750df0d6dc7b1a.tar.bz2 rails-4edce566ad13d54c86637caf56750df0d6dc7b1a.zip |
Merge pull request #30361 from mfo/master
StreamingTemplateRenderer fails to forward I18n.locale in layouts
Diffstat (limited to 'actionview/lib/action_view/renderer/streaming_template_renderer.rb')
-rw-r--r-- | actionview/lib/action_view/renderer/streaming_template_renderer.rb | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/actionview/lib/action_view/renderer/streaming_template_renderer.rb b/actionview/lib/action_view/renderer/streaming_template_renderer.rb index ca49eb1144..276a28ce07 100644 --- a/actionview/lib/action_view/renderer/streaming_template_renderer.rb +++ b/actionview/lib/action_view/renderer/streaming_template_renderer.rb @@ -65,7 +65,9 @@ module ActionView yielder = lambda { |*name| view._layout_for(*name) } instrument(:template, identifier: template.identifier, layout: layout.try(:virtual_path)) do + outer_config = I18n.config fiber = Fiber.new do + I18n.config = outer_config if layout layout.render(view, locals, output, &yielder) else |