diff options
author | Jamis Buck <jamis@37signals.com> | 2005-09-30 19:10:20 +0000 |
---|---|---|
committer | Jamis Buck <jamis@37signals.com> | 2005-09-30 19:10:20 +0000 |
commit | 1e08d11579f0080f086a6bfea1693826a0c09c95 (patch) | |
tree | 19882f8832382c9940a3126b0a9d4ecc9a904bfb /actionpack/lib | |
parent | 11de94748e1543065748637b083984a69350b1a6 (diff) | |
download | rails-1e08d11579f0080f086a6bfea1693826a0c09c95.tar.gz rails-1e08d11579f0080f086a6bfea1693826a0c09c95.tar.bz2 rails-1e08d11579f0080f086a6bfea1693826a0c09c95.zip |
Don't prepend the asset host if the string is already a fully-qualified URL
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2430 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'actionpack/lib')
-rw-r--r-- | actionpack/lib/action_view/helpers/asset_tag_helper.rb | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/actionpack/lib/action_view/helpers/asset_tag_helper.rb b/actionpack/lib/action_view/helpers/asset_tag_helper.rb index 23d691bb13..a79c01574b 100644 --- a/actionpack/lib/action_view/helpers/asset_tag_helper.rb +++ b/actionpack/lib/action_view/helpers/asset_tag_helper.rb @@ -131,7 +131,8 @@ module ActionView source = "/#{dir}/#{source}" unless source.first == "/" || source.include?(":") source = "#{source}.#{ext}" unless source.include?(".") source = "#{@controller.request.relative_url_root}#{source}" unless %r{^[-a-z]+://} =~ source - ActionController::Base.asset_host + source + source = ActionController::Base.asset_host + source unless source.include?(":") + source end end end |