aboutsummaryrefslogtreecommitdiffstats
path: root/actionview
diff options
context:
space:
mode:
authorRafael França <rafaelmfranca@gmail.com>2017-10-05 19:59:00 -0400
committerGitHub <noreply@github.com>2017-10-05 19:59:00 -0400
commit883d83bf727b23d9c9d10a3366441468d1273b02 (patch)
treef30462d30496a9525fb3e406cd2c4961c9719f71 /actionview
parent8c9a93090bff5f7350f2b22de5d37d863feffa53 (diff)
parentd1170ddd41e5e88c94dd1c4d7dde2c4212d265c1 (diff)
downloadrails-883d83bf727b23d9c9d10a3366441468d1273b02.tar.gz
rails-883d83bf727b23d9c9d10a3366441468d1273b02.tar.bz2
rails-883d83bf727b23d9c9d10a3366441468d1273b02.zip
Merge pull request #30812 from ahorek/request_check
link tags shouldn't depend on the request
Diffstat (limited to 'actionview')
-rw-r--r--actionview/lib/action_view/helpers/asset_tag_helper.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/actionview/lib/action_view/helpers/asset_tag_helper.rb b/actionview/lib/action_view/helpers/asset_tag_helper.rb
index f4f1030ac4..10b366b030 100644
--- a/actionview/lib/action_view/helpers/asset_tag_helper.rb
+++ b/actionview/lib/action_view/helpers/asset_tag_helper.rb
@@ -91,7 +91,7 @@ module ActionView
content_tag("script".freeze, "", tag_options)
}.join("\n").html_safe
- request.send_early_hints("Link" => early_hints_links.join("\n"))
+ request.send_early_hints("Link" => early_hints_links.join("\n")) if respond_to?(:request)
sources_tags
end
@@ -140,7 +140,7 @@ module ActionView
tag(:link, tag_options)
}.join("\n").html_safe
- request.send_early_hints("Link" => early_hints_links.join("\n"))
+ request.send_early_hints("Link" => early_hints_links.join("\n")) if respond_to?(:request)
sources_tags
end