aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_view/helpers
diff options
context:
space:
mode:
authorDavid Heinemeier Hansson <david@loudthinking.com>2011-04-26 11:56:40 -0700
committerDavid Heinemeier Hansson <david@loudthinking.com>2011-04-26 11:56:40 -0700
commit4ce14fb0809ea8d636be0a1790fa38eafe64a46f (patch)
tree9b249583ca33753407828e337eea6a1c0bc8ea7e /actionpack/lib/action_view/helpers
parentc57320d769346288326534999f2ed6e10368e525 (diff)
parentc15108ce063f6396a6e93a54e973b858d0280d41 (diff)
downloadrails-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/helpers')
-rw-r--r--actionpack/lib/action_view/helpers/asset_paths.rb4
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