diff options
author | David Heinemeier Hansson <david@loudthinking.com> | 2011-04-26 11:56:40 -0700 |
---|---|---|
committer | David Heinemeier Hansson <david@loudthinking.com> | 2011-04-26 11:56:40 -0700 |
commit | 4ce14fb0809ea8d636be0a1790fa38eafe64a46f (patch) | |
tree | 9b249583ca33753407828e337eea6a1c0bc8ea7e /actionpack/lib/action_view | |
parent | c57320d769346288326534999f2ed6e10368e525 (diff) | |
parent | c15108ce063f6396a6e93a54e973b858d0280d41 (diff) | |
download | rails-4ce14fb0809ea8d636be0a1790fa38eafe64a46f.tar.gz rails-4ce14fb0809ea8d636be0a1790fa38eafe64a46f.tar.bz2 rails-4ce14fb0809ea8d636be0a1790fa38eafe64a46f.zip |
Merged pull request #313 from chadk/master.
[patch] Asset helpers should understand scheme-relative URLs
Diffstat (limited to 'actionpack/lib/action_view')
-rw-r--r-- | actionpack/lib/action_view/helpers/asset_paths.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/actionpack/lib/action_view/helpers/asset_paths.rb b/actionpack/lib/action_view/helpers/asset_paths.rb index 55a4c442fd..cb6737b94e 100644 --- a/actionpack/lib/action_view/helpers/asset_paths.rb +++ b/actionpack/lib/action_view/helpers/asset_paths.rb @@ -12,7 +12,7 @@ module ActionView @controller = controller end - # Add the extension +ext+ if not present. Return full URLs otherwise untouched. + # Add the extension +ext+ if not present. Return full or scheme-relative URLs otherwise untouched. # Prefix with <tt>/dir/</tt> if lacking a leading +/+. Account for relative URL # roots. Rewrite the asset path for cache-busting asset ids. Include # asset host, if configured, with the correct request protocol. @@ -33,7 +33,7 @@ module ActionView end def is_uri?(path) - path =~ %r{^[-a-z]+://|^cid:} + path =~ %r{^[-a-z]+://|^cid:|^//} end private |