aboutsummaryrefslogtreecommitdiffstats
path: root/actionview
diff options
context:
space:
mode:
authorpavel <pavel.rosicky@easy.cz>2017-10-05 23:34:58 +0200
committerpavel <pavel.rosicky@easy.cz>2017-10-05 23:34:58 +0200
commitd1170ddd41e5e88c94dd1c4d7dde2c4212d265c1 (patch)
treef30462d30496a9525fb3e406cd2c4961c9719f71 /actionview
parent8c9a93090bff5f7350f2b22de5d37d863feffa53 (diff)
downloadrails-d1170ddd41e5e88c94dd1c4d7dde2c4212d265c1.tar.gz
rails-d1170ddd41e5e88c94dd1c4d7dde2c4212d265c1.tar.bz2
rails-d1170ddd41e5e88c94dd1c4d7dde2c4212d265c1.zip
request check
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