Re: [openstreetmap/openstreetmap-website] XML generation: nodes, ways, relations, map controller → view (#2223)

Tom Hughes notifications at github.com
Wed Jul 3 17:06:53 UTC 2019


tomhughes commented on this pull request.

I can't see any obvious issues... I mean a lot of the controller code makes me want to gag and can probably be rationalised but that's not anything you've done, it's just how how the code has always been ;-)

> @@ -0,0 +1,8 @@
+xml.instruct!
+
+xml.osm(OSM::API.new.xml_root_attributes) do |osm|
+  osm << (render(:partial => "bounds", :object => @bounds) || "")
+  osm << (render(@nodes) || "")
+  osm << (render(@ways) || "")
+  osm << (render(@relations) || "")

Why do we need all the `|| ""` stuff here? What does adding a string to the XML even do?

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/2223#pullrequestreview-257623703
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20190703/3cae194a/attachment.html>


More information about the rails-dev mailing list