]> git.openstreetmap.org Git - rails.git/blobdiff - app/helpers/application_helper.rb
Merge branch 'master' into openid
[rails.git] / 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