mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Fixed that compute_public_path should recognize external URLs, so image_tag("http://www.example.com/images/icon.gif") is not prefixed with the relative url path #1254 [victor-ronr-trac@carotena.net]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1321 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
This commit is contained in:
parent
202d5c0751
commit
473e5bde74
3 changed files with 4 additions and 1 deletions
|
@ -1,5 +1,7 @@
|
|||
*SVN*
|
||||
|
||||
* Fixed that compute_public_path should recognize external URLs, so image_tag("http://www.example.com/images/icon.gif") is not prefixed with the relative url path #1254 [victor-ronr-trac@carotena.net]
|
||||
|
||||
* Added support for descending year values in DateHelper#select_year, like select_year(Date.today, :start_year => 2005, :end_year => 1900), which would count down from 2005 to 1900 instead of the other way #1274 [nwoods@mail.com]
|
||||
|
||||
* Fixed that FormHelper#checkbox should return a checked checkbox if the value is the same as checked_value #1286 [Florian Weber]
|
||||
|
|
|
@ -109,7 +109,7 @@ module ActionView
|
|||
def compute_public_path(source, dir, ext)
|
||||
source = "/#{dir}/#{source}" unless source.include?("/")
|
||||
source = "#{source}.#{ext}" unless source.include?(".")
|
||||
source = "#{@request.relative_url_root}#{source}"
|
||||
source = "#{@request.relative_url_root}#{source}" unless %r{^[-a-z]+://} =~ source
|
||||
ActionController::Base.asset_host + source
|
||||
end
|
||||
end
|
||||
|
|
|
@ -143,6 +143,7 @@ class AssetTagHelperNonVhostTest < Test::Unit::TestCase
|
|||
%(image_tag("xml")) => %(<img alt="Xml" src="/calloboration/hieraki/images/xml.png" />),
|
||||
%(image_tag("rss", :alt => "rss syndication")) => %(<img alt="rss syndication" src="/calloboration/hieraki/images/rss.png" />),
|
||||
%(image_tag("gold", :size => "45x70")) => %(<img alt="Gold" height="70" src="/calloboration/hieraki/images/gold.png" width="45" />),
|
||||
%(image_tag("http://www.example.com/images/icon.gif")) => %(<img alt="Icon" src="http://www.example.com/images/icon.gif" />),
|
||||
}
|
||||
|
||||
def test_auto_discovery
|
||||
|
|
Loading…
Reference in a new issue