diff options
author | David Heinemeier Hansson <david@loudthinking.com> | 2006-03-29 21:11:44 +0000 |
---|---|---|
committer | David Heinemeier Hansson <david@loudthinking.com> | 2006-03-29 21:11:44 +0000 |
commit | 2cc9b21c074c99dad95cebfb0ae2ed787b482123 (patch) | |
tree | 5f1e3fb5c1f688c619831a5ea2abe01f3f19b74c /actionpack/lib/action_view/helpers | |
parent | 91383e04265f41c3a8ae9411b05384b7ef2a36c1 (diff) | |
download | rails-2cc9b21c074c99dad95cebfb0ae2ed787b482123.tar.gz rails-2cc9b21c074c99dad95cebfb0ae2ed787b482123.tar.bz2 rails-2cc9b21c074c99dad95cebfb0ae2ed787b482123.zip |
Skip complete URLs
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4099 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'actionpack/lib/action_view/helpers')
-rw-r--r-- | actionpack/lib/action_view/helpers/asset_tag_helper.rb | 2 |
1 files changed, 1 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 de44ef6531..21708a37ef 100644 --- a/actionpack/lib/action_view/helpers/asset_tag_helper.rb +++ b/actionpack/lib/action_view/helpers/asset_tag_helper.rb @@ -152,7 +152,7 @@ module ActionView def compute_public_path(source, dir, ext) source = "/#{dir}/#{source}" unless source.first == "/" || source.include?(":") source << ".#{ext}" unless source.split("/").last.include?(".") - source << '?' + rails_asset_id(source) if defined?(RAILS_ROOT) + source << '?' + rails_asset_id(source) if defined?(RAILS_ROOT) && %r{^[-a-z]+://} !~ source source = "#{@controller.request.relative_url_root}#{source}" unless %r{^[-a-z]+://} =~ source source = ActionController::Base.asset_host + source unless source.include?(":") source |