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

mmd notifications at
Wed Jun 26 20:16:14 UTC 2019

> Check out #2278 since it applies to many of the partial renderings that you have in this PR.

Not 100% sure, if my understanding is right, so let's try `/map/index.xml.builder`:


xml.osm( do |osm|
  osm << (render(:partial => "bounds", :object => @bounds) || "")
  osm << (render(@nodes) || "")
  osm << (render(@ways) || "")
  osm << (render(@relations) || "")


`API threw unexpected ActionView::Template::Error exception: Missing partial api/nodes/_node with {:locale=>[:en], :formats=>[:xml], :variants=>[], :handlers=>[:raw, :erb, :html, :builder, :ruby, :jsonify, :coffee]}. `

I believe this kind of optimization doesn't work due to the way I'm keeping all node, way and relation partials under the umbrella of the /map call.

#2278 works in that other pull request, as all partials are located in the directory named after the model, so the direct lookup is possible. Somehow I'm working against that convention in my coding...

I think he only way to make this work would be to move /api/map/_{node,way,relation}.xml.builder to /api/{nodes,ways,relations} respectively.

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: <>

More information about the rails-dev mailing list