X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/7eb181999d3357bf210ceb24e18c913bf3ef6ba3..a90be5e69a478e2b49ae676b649a78589f85a50e:/app/controllers/geocoder_controller.rb?ds=sidebyside diff --git a/app/controllers/geocoder_controller.rb b/app/controllers/geocoder_controller.rb index 79da2f6e9..531cce422 100644 --- a/app/controllers/geocoder_controller.rb +++ b/app/controllers/geocoder_controller.rb @@ -102,7 +102,7 @@ private response = fetch_xml("http://geocoder.ca/?geoit=XML&postal=#{escape_query(query)}") # parse the response - unless response.get_elements("geodata/error") + if response.get_elements("geodata/error").empty? results.push({:lat => response.get_text("geodata/latt").to_s, :lon => response.get_text("geodata/longt").to_s, :zoom => POSTCODE_ZOOM,