]> git.openstreetmap.org Git - rails.git/blob - app/views/api/relations/_relation.xml.builder
Remove simulating clicks on <a> when <li> is clicked
[rails.git] / app / views / api / relations / _relation.xml.builder
1 attrs = {
2   "id" => relation.id,
3   "visible" => relation.visible,
4   "version" => relation.version,
5   "changeset" => relation.changeset_id,
6   "timestamp" => relation.timestamp.xmlschema,
7   "user" => relation.changeset.user.display_name,
8   "uid" => relation.changeset.user_id
9 }
10
11 xml.relation(attrs) do |r|
12   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   relation.tags.each do |k, v|
17     r.tag(:k => k, :v => v)
18   end
19 end