aboutsummaryrefslogtreecommitdiffstats
path: root/actionview/lib/action_view
diff options
context:
space:
mode:
authorJeffrey Guenther <guenther.jeffrey@gmail.com>2017-12-14 19:03:28 -0800
committerJeffrey Guenther <guenther.jeffrey@gmail.com>2017-12-14 19:03:28 -0800
commit1c5358e4729ce48b0e597d0b39d22f3b1c42f6fc (patch)
treeea060a71e57ec1e6366a33f7e40be14ea2f0d64b /actionview/lib/action_view
parentab2a95db8088b7607017671b82e396bcd9e80332 (diff)
parentcc0d272c8c37c197a7e68633e5f082eccb2e3737 (diff)
downloadrails-1c5358e4729ce48b0e597d0b39d22f3b1c42f6fc.tar.gz
rails-1c5358e4729ce48b0e597d0b39d22f3b1c42f6fc.tar.bz2
rails-1c5358e4729ce48b0e597d0b39d22f3b1c42f6fc.zip
Merge branch 'master' into activestorage-guide
Diffstat (limited to 'actionview/lib/action_view')
-rw-r--r--actionview/lib/action_view/digestor.rb2
-rw-r--r--actionview/lib/action_view/helpers/url_helper.rb5
-rw-r--r--actionview/lib/action_view/renderer/streaming_template_renderer.rb2
3 files changed, 8 insertions, 1 deletions
diff --git a/actionview/lib/action_view/digestor.rb b/actionview/lib/action_view/digestor.rb
index dfd62bdcfd..1cf0bd3016 100644
--- a/actionview/lib/action_view/digestor.rb
+++ b/actionview/lib/action_view/digestor.rb
@@ -89,7 +89,7 @@ module ActionView
end
def digest(finder, stack = [])
- Digest::MD5.hexdigest("#{template.source}-#{dependency_digest(finder, stack)}")
+ ActiveSupport::Digest.hexdigest("#{template.source}-#{dependency_digest(finder, stack)}")
end
def dependency_digest(finder, stack)
diff --git a/actionview/lib/action_view/helpers/url_helper.rb b/actionview/lib/action_view/helpers/url_helper.rb
index 02335c72ec..889562c478 100644
--- a/actionview/lib/action_view/helpers/url_helper.rb
+++ b/actionview/lib/action_view/helpers/url_helper.rb
@@ -139,6 +139,11 @@ module ActionView
# link_to "Profiles", controller: "profiles"
# # => <a href="/profiles">Profiles</a>
#
+ # When name is +nil+ the href is presented instead
+ #
+ # link_to nil, "http://example.com"
+ # # => <a href="http://www.example.com">http://www.example.com</a>
+ #
# You can use a block as well if your link target is hard to fit into the name parameter. ERB example:
#
# <%= link_to(@profile) do %>
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