aboutsummaryrefslogtreecommitdiffstats
path: root/actionview/lib
diff options
context:
space:
mode:
authorLaurent Arnoud <laurent@spkdev.net>2019-06-12 13:57:48 +0200
committerLaurent Arnoud <laurent@spkdev.net>2019-06-12 13:57:48 +0200
commit6b651d990404239230c821cadfc4ddf8363cb48c (patch)
tree7d7e6efeba90544d5d12880df23393612fe9c2ea /actionview/lib
parentfb3ecbf130e141688782bafb7da979bf0ecedf1a (diff)
downloadrails-6b651d990404239230c821cadfc4ddf8363cb48c.tar.gz
rails-6b651d990404239230c821cadfc4ddf8363cb48c.tar.bz2
rails-6b651d990404239230c821cadfc4ddf8363cb48c.zip
Add documentation on actionview asset_path with host and protocol
Diffstat (limited to 'actionview/lib')
-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>)
#