]> git.openstreetmap.org Git - rails.git/blobdiff - test/functional/relation_controller_test.rb
Improve styling of rails validation errors
[rails.git] / test / functional / relation_controller_test.rb
index c62496cd699b80fb81b92f7e75def650d42a14e8..502404ccaa73a94338da754d53eaeea9c6ed93fe 100644 (file)
@@ -916,7 +916,7 @@ OSM
   ##
   # returns a k->v hash of tags from an xml doc
   def get_tags_as_hash(a) 
-    a.find("//osm/relation/tag").inject({}) do |h,v|
+    a.find("//osm/relation/tag").sort_by { |v| v['k'] }.inject({}) do |h,v|
       h[v['k']] = v['v']
       h
     end