From: Tom Hughes Date: Fri, 12 Oct 2007 16:34:38 +0000 (+0000) Subject: Fix geolocation to actually work... X-Git-Tag: live~8055 X-Git-Url: https://git.openstreetmap.org/rails.git/commitdiff_plain/f82f362cea0c044a96da1dfd801d5e4b0196ac32 Fix geolocation to actually work... --- diff --git a/lib/osm.rb b/lib/osm.rb index 45c506e2e..0f059ce98 100644 --- a/lib/osm.rb +++ b/lib/osm.rb @@ -374,7 +374,7 @@ module OSM Timeout::timeout(4) do Net::HTTP.start('api.hostip.info') do |http| country = http.get("/country.php?ip=#{ip_address}").body - country = "GB" if country = "UK" + country = "GB" if country == "UK" Net::HTTP.start('ws.geonames.org') do |http| xml = REXML::Document.new(http.get("/countryInfo?country=#{country}").body) xml.elements.each("geonames/country") do |ele|