diff options
author | David Heinemeier Hansson <david@loudthinking.com> | 2006-03-02 01:54:53 +0000 |
---|---|---|
committer | David Heinemeier Hansson <david@loudthinking.com> | 2006-03-02 01:54:53 +0000 |
commit | 3fb29b172fb1ab0b84fd69747b62711ed5cdf4ca (patch) | |
tree | a5d8d18b5487dc7fcac1bbcd5eff51091c20d9de /actionpack/lib | |
parent | 4c5db2c7eac5fc7fe76e0c0cd12d8adf5b7ea4f1 (diff) | |
download | rails-3fb29b172fb1ab0b84fd69747b62711ed5cdf4ca.tar.gz rails-3fb29b172fb1ab0b84fd69747b62711ed5cdf4ca.tar.bz2 rails-3fb29b172fb1ab0b84fd69747b62711ed5cdf4ca.zip |
Fixed that default image extension was not appended when using a full URL with AssetTagHelper#image_tag (closes #4032, #3728) [rubyonrails@beautifulpixel.com]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3740 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'actionpack/lib')
-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 a5687923b2..f05d9a096b 100644 --- a/actionpack/lib/action_view/helpers/asset_tag_helper.rb +++ b/actionpack/lib/action_view/helpers/asset_tag_helper.rb @@ -146,7 +146,7 @@ module ActionView private def compute_public_path(source, dir, ext) source = "/#{dir}/#{source}" unless source.first == "/" || source.include?(":") - source = "#{source}.#{ext}" unless source.include?(".") + source = "#{source}.#{ext}" unless source.split("/").last.include?(".") source = "#{@controller.request.relative_url_root}#{source}" unless %r{^[-a-z]+://} =~ source source = ActionController::Base.asset_host + source unless source.include?(":") source |