aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_view/helpers/asset_tag_helper.rb
diff options
context:
space:
mode:
Diffstat (limited to 'actionpack/lib/action_view/helpers/asset_tag_helper.rb')
-rw-r--r--actionpack/lib/action_view/helpers/asset_tag_helper.rb8
1 files changed, 6 insertions, 2 deletions
diff --git a/actionpack/lib/action_view/helpers/asset_tag_helper.rb b/actionpack/lib/action_view/helpers/asset_tag_helper.rb
index cf2a117966..11743e36f2 100644
--- a/actionpack/lib/action_view/helpers/asset_tag_helper.rb
+++ b/actionpack/lib/action_view/helpers/asset_tag_helper.rb
@@ -53,9 +53,11 @@ module ActionView
#
def javascript_include_tag(*sources)
options = sources.extract_options!.stringify_keys
+ path_options = options.extract!('protocol').symbolize_keys
+
sources.uniq.map { |source|
tag_options = {
- "src" => path_to_javascript(source)
+ "src" => path_to_javascript(source, path_options)
}.merge(options)
content_tag(:script, "", tag_options)
}.join("\n").html_safe
@@ -89,11 +91,13 @@ module ActionView
#
def stylesheet_link_tag(*sources)
options = sources.extract_options!.stringify_keys
+ path_options = options.extract!('protocol').symbolize_keys
+
sources.uniq.map { |source|
tag_options = {
"rel" => "stylesheet",
"media" => "screen",
- "href" => path_to_stylesheet(source)
+ "href" => path_to_stylesheet(source, path_options)
}.merge(options)
tag(:link, tag_options)
}.join("\n").html_safe