]> git.openstreetmap.org Git - rails.git/blob - app/views/api/old_relations/_old_relation.xml.builder
get_text("reversegeocode/result") returns an XML node. We want to get the text value...
[rails.git] / app / views / api / old_relations / _old_relation.xml.builder
1 attrs = {
2   "id" => old_relation.relation_id,
3   "visible" => old_relation.visible,
4   "version" => old_relation.version,
5   "changeset" => old_relation.changeset_id,
6   "timestamp" => old_relation.timestamp.xmlschema,
7   "user" => old_relation.changeset.user.display_name,
8   "uid" => old_relation.changeset.user_id
9 }
10
11 xml.relation(attrs) do |r|
12   old_relation.relation_members.each do |m|
13     r.member(:type => m.member_type.downcase, :ref => m.member_id, :role => m.member_role)
14   end
15
16   old_relation.tags.each do |k, v|
17     r.tag(:k => k, :v => v)
18   end
19 end