X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/4cc400de436a5dc33b66bc735b5fb6257e066a5a..1ffb5c1502d870a1d1c46648ea0c165e25dfbef9:/app/controllers/geocoder_controller.rb 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,