I have an image that contains a carrier load:
Image.find(:first).image.url #=> "/uploads/image/4d90/display_foo.jpg"
In my opinion, I want to find an absolute URL for this. Adding root_url leads to a double / .
root_url + image.url
I canβt use url_for (what I know) because it either allows passing a path or a list of parameters to identify the resource and :only_path option. Since I do not have a resource that can be identified through the "controller" + "action", I can not use the parameter :only_path .
url_for(image.url, :only_path => true)
What would be the cleanest and best way to create a path to the full URL in Rails3?
url ruby ruby-on-rails path ruby-on-rails-3
berkes Mar 30 '11 at 10:00 2011-03-30 10:00
source share