aboutsummaryrefslogtreecommitdiffstats
path: root/actionview
diff options
context:
space:
mode:
authorRafael França <rafael@franca.dev>2019-07-24 14:14:08 -0400
committerGitHub <noreply@github.com>2019-07-24 14:14:08 -0400
commit89ba95b69a4b79f3469254b6fbb164491df9454a (patch)
treeb65ea952afb46468e491ef0885b28a39c090f1b1 /actionview
parent4139dbdc1d56c1b6fd4ac5d238ab7ce479720fbb (diff)
parent6b651d990404239230c821cadfc4ddf8363cb48c (diff)
downloadrails-89ba95b69a4b79f3469254b6fbb164491df9454a.tar.gz
rails-89ba95b69a4b79f3469254b6fbb164491df9454a.tar.bz2
rails-89ba95b69a4b79f3469254b6fbb164491df9454a.zip
Merge pull request #36467 from spk/add-doc-host-protocol-asset_path
Add documentation on actionview asset_path with host and protocol
Diffstat (limited to 'actionview')
-rw-r--r--actionview/lib/action_view/helpers/asset_url_helper.rb2
1 files changed, 2 insertions, 0 deletions
diff --git a/actionview/lib/action_view/helpers/asset_url_helper.rb b/actionview/lib/action_view/helpers/asset_url_helper.rb
index cc62783d60..295f945325 100644
--- a/actionview/lib/action_view/helpers/asset_url_helper.rb
+++ b/actionview/lib/action_view/helpers/asset_url_helper.rb
@@ -133,6 +133,8 @@ module ActionView
# which is implemented by sprockets-rails.
#
# asset_path("application.js") # => "/assets/application-60aa4fdc5cea14baf5400fba1abf4f2a46a5166bad4772b1effe341570f07de9.js"
+ # asset_path('application.js', host: 'example.com') # => "//example.com/assets/application.js"
+ # asset_path("application.js", host: 'example.com', protocol: 'https') # => "https://example.com/assets/application.js"
#
# === Without the asset pipeline (<tt>skip_pipeline: true</tt>)
#