]> git.openstreetmap.org Git - rails.git/blobdiff - lib/osm.rb
Add strikethrough style to browser when objects are deleted
[rails.git] / lib / osm.rb
index c92655aeea207b48393645e6bb9aeb4bcf478c4c..704bc099ce23d8ae1ff2c1abdc51e422c57869ee 100644 (file)
@@ -471,9 +471,7 @@ module OSM
   def self.IPLocation(ip_address)
     code = OSM.IPToCountry(ip_address)
 
-    unless code.nil?
-      country = Country.find_by_code(code)
-
+    if code and country = Country.find_by_code(code)
       return { :minlon => country.min_lon, :minlat => country.min_lat, :maxlon => country.max_lon, :maxlat => country.max_lat }
     end