diff options
author | Vasiliy Ermolovich <younash@gmail.com> | 2012-12-01 18:26:47 +0300 |
---|---|---|
committer | Vasiliy Ermolovich <younash@gmail.com> | 2012-12-18 11:16:17 +0300 |
commit | 0a6d8fbe1738984a9cae2168b97461b2ccf64c49 (patch) | |
tree | a91e10d767e4cdd64b235c6c8aa4e013040aa418 /actionpack/lib/action_view | |
parent | 60214e80572ca8a4ddb4f2af4a6653efa2e74023 (diff) | |
download | rails-0a6d8fbe1738984a9cae2168b97461b2ccf64c49.tar.gz rails-0a6d8fbe1738984a9cae2168b97461b2ccf64c49.tar.bz2 rails-0a6d8fbe1738984a9cae2168b97461b2ccf64c49.zip |
handle protocol option in stylesheet_link_tag and javascript_include_tag
closes #8388
Diffstat (limited to 'actionpack/lib/action_view')
-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 |