Skip to main content

Rails: Full URLs for Images

In certain rare cases, you might need to generate a full URL for an image. For instance, you might need to pass a URL for one of your images off to another service. This is best I could come up with:
url_for(:controller => "/some-image.jpg", :only_path => false)

Comments

otavio said…
thanks!