Monday, December 28, 2009

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)

1 comment:

otavio said...

thanks!