]> git.openstreetmap.org Git - rails.git/commitdiff
Fix scoping of reverse geocode result
authorTom Hughes <tom@compton.nu>
Thu, 22 Jul 2010 23:53:36 +0000 (00:53 +0100)
committerTom Hughes <tom@compton.nu>
Thu, 22 Jul 2010 23:53:36 +0000 (00:53 +0100)
app/helpers/application_helper.rb

index 3d2c70a132d566b36d6770226c2d8bbd4c919bb6..2ccfcca2b0a5b8e33107d6731ae5f6b297ccf594 100644 (file)
@@ -85,8 +85,8 @@ module ApplicationHelper
     url = "http://nominatim.openstreetmap.org/reverse?lat=#{lat}&lon=#{lon}&zoom=#{zoom}&accept-language=#{language}"
 
     begin
-      Timeout::timeout(4) do
-        response = REXML::Document.new(Net::HTTP.get(URI.parse(url)))
+      response = Timeout::timeout(4) do
+        REXML::Document.new(Net::HTTP.get(URI.parse(url)))
       end
     rescue Exception
       response = nil