diff options
author | Steve Klabnik <steve@steveklabnik.com> | 2012-12-18 00:37:22 -0800 |
---|---|---|
committer | Steve Klabnik <steve@steveklabnik.com> | 2012-12-18 00:37:22 -0800 |
commit | bd5f0ada125004a3d91390e43d914f92b00139d8 (patch) | |
tree | a91e10d767e4cdd64b235c6c8aa4e013040aa418 /actionpack/lib | |
parent | 60214e80572ca8a4ddb4f2af4a6653efa2e74023 (diff) | |
parent | 0a6d8fbe1738984a9cae2168b97461b2ccf64c49 (diff) | |
download | rails-bd5f0ada125004a3d91390e43d914f92b00139d8.tar.gz rails-bd5f0ada125004a3d91390e43d914f92b00139d8.tar.bz2 rails-bd5f0ada125004a3d91390e43d914f92b00139d8.zip |
Merge pull request #8389 from nashby/issue-8388
handle protocol option in stylesheet_link_tag and javascript_include_tag
Diffstat (limited to 'actionpack/lib')
-rw-r--r-- | actionpack/lib/action_view/helpers/asset_tag_helper.rb | 8 |
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 |