aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_view/helpers/asset_paths.rb
diff options
context:
space:
mode:
authorChad Krsek <chad.krsek@gmail.com>2011-04-25 21:57:49 -0700
committerChad Krsek <chad.krsek@gmail.com>2011-04-25 21:57:49 -0700
commit7469041c59724163a9108b037f0965469282b70c (patch)
tree64a8c88175efc165661d57f0788f0d7d6e36d46e /actionpack/lib/action_view/helpers/asset_paths.rb
parent057412ce38ead06307a887dca333837a99f84f22 (diff)
downloadrails-7469041c59724163a9108b037f0965469282b70c.tar.gz
rails-7469041c59724163a9108b037f0965469282b70c.tar.bz2
rails-7469041c59724163a9108b037f0965469282b70c.zip
Revert "asset helpers should understand scheme-relative URLs"
This reverts commit 057412ce38ead06307a887dca333837a99f84f22.
Diffstat (limited to 'actionpack/lib/action_view/helpers/asset_paths.rb')
-rw-r--r--actionpack/lib/action_view/helpers/asset_paths.rb11
1 files changed, 2 insertions, 9 deletions
diff --git a/actionpack/lib/action_view/helpers/asset_paths.rb b/actionpack/lib/action_view/helpers/asset_paths.rb
index 0429e60cd5..55a4c442fd 100644
--- a/actionpack/lib/action_view/helpers/asset_paths.rb
+++ b/actionpack/lib/action_view/helpers/asset_paths.rb
@@ -12,13 +12,13 @@ module ActionView
@controller = controller
end
- # Add the extension +ext+ if not present. Return full or scheme-relative URLs otherwise untouched.
+ # Add the extension +ext+ if not present. Return full 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.
def compute_public_path(source, dir, ext = nil, include_host = true)
source = source.to_s
- return source if is_uri?(source) || is_scheme_relative_uri?(source)
+ return source if is_uri?(source)
source = rewrite_extension(source, dir, ext) if ext
source = "/#{dir}/#{source}" unless source[0] == ?/
@@ -36,13 +36,6 @@ module ActionView
path =~ %r{^[-a-z]+://|^cid:}
end
- # A URI relative to a base URI's scheme?
- # See http://labs.apache.org/webarch/uri/rfc/rfc3986.html#relative-normal
- # "//g" => "http://g"
- def is_scheme_relative_uri?(path)
- path =~ %r{^//}
- end
-
private
def rewrite_extension(source, dir, ext)