i've got the latest ruby and rails on this box and am seeing that image_tag
will turn something like
/foo/bar.jpg
into
/foo/foo/bar.jpg
in the following situation:
/ror/foo/public
/var/www/html/foo -> /var/ror/foo/public/
image_tag("/foo/bar.jpg")
this is exactly how compute_public_path is written to work:
def compute_public_path(source, dir, ext)
source = "/#{dir}/#{source}" unless source.first == "/" ||
source.include?(":")
source = "#{source}.#{ext}" unless source.include?(".")
source = "[EMAIL PROTECTED]" unless %r{^[-a-z]+://} =~ source
source = ActionController::Base.asset_host + source unless
source.include?(":")
source
end
can this be correct? in this line
source = "[EMAIL PROTECTED]" unless %r{^[-a-z]+://} =~ source
we'll take the url
/foo/bar.jpg
and prepend /foo onto it again, even though it's already an absolute url. in
trying to create a patch i'd like to understand the logic here.
??
the code that's already adding /foo is the filecolumn plugin (using
@request.relative_url_root) - which is in error: rails or the plugin?
should urls with relative_url_root already prepended be smoothly handled by
rails and not added to again, or is the plugin in error by prepending
something that rails will anyhow?
??
regards.
-a
--
===============================================================================
| ara [dot] t [dot] howard [at] noaa [dot] gov
| all happiness comes from the desire for others to be happy. all misery
| comes from the desire for oneself to be happy.
| -- bodhicaryavatara
===============================================================================
_______________________________________________
Rails-core mailing list
[email protected]
http://lists.rubyonrails.org/mailman/listinfo/rails-core