[openstreetmap/openstreetmap-website] Use image_url instead of image_path in feeds? (#1379)

Andy Allan notifications at github.com
Thu Nov 24 18:47:41 UTC 2016

In RSS and Atom feeds, we need to supply the full url (i.e. with hostname) when constructing links to images. We use `image_path("foo.png", :host => SERVER_URL)` and #1378 makes this consistent.

However, there's an alternative: `image_url("foo.png")`, which also generates full urls. It seems to work to me. All of our `url_for(foo, :only_path => false)` work for generating urls for non-image paths, without needing SERVER_URL to be passed around.

Is there any reason that I haven't figured out to stick with `image_path` instead of `image_url`?

You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20161124/89956f41/attachment.html>

More information about the rails-dev mailing list