]> git.openstreetmap.org Git - rails.git/blob - app/views/api/old_ways/_old_way.xml.builder
Move xml gen. into view for (old) nodes, ways, relations, map
[rails.git] / app / views / api / old_ways / _old_way.xml.builder
1 attrs = {
2   "id" => old_way.way_id,
3   "visible" => old_way.visible,
4   "version" => old_way.version,
5   "changeset" => old_way.changeset_id,
6   "timestamp" => old_way.timestamp.xmlschema,
7   "user" => old_way.changeset.user.display_name,
8   "uid" => old_way.changeset.user_id
9 }
10
11 xml.way(attrs) do |w|
12   old_way.nds.each do |n|
13     w.nd(:ref => n)
14   end
15
16   old_way.tags.each do |k, v|
17     w.tag(:k => k, :v => v)
18   end
19 end