-json.partial! "api/map/root_attributes"
+json.partial! "api/root_attributes"
-all = @nodes + [@way]
-
-json.elements(all) do |obj|
- json.partial! obj
+json.elements do
+ json.array! @nodes, :partial => "/api/nodes/node", :as => :node
+ json.array! [@way], :partial => "/api/ways/way", :as => :way
end