get :full, :id => current_relations(:visible_relation).id
assert_response :success
# FIXME check whether this contains the stuff we want!
- if $VERBOSE
- print @response.body
- end
+ print @response.body if $VERBOSE
end
##
##
# returns a k->v hash of tags from an xml doc
def get_tags_as_hash(a)
- a.find("//osm/relation/tag").sort_by { |v| v['k'] }.inject({}) do |h, v|
+ a.find("//osm/relation/tag").sort_by { |v| v['k'] }.each_with_object({}) do |v, h|
h[v['k']] = v['v']
- h
end
end