Skip to content
This repository has been archived by the owner on Apr 4, 2018. It is now read-only.

Commit

Permalink
put this back as we found it
Browse files Browse the repository at this point in the history
  • Loading branch information
garethr committed Dec 22, 2011
1 parent be8d83d commit cfdc6bd
Showing 1 changed file with 8 additions and 9 deletions.
17 changes: 8 additions & 9 deletions lib/geogov/geo_stack.rb
Expand Up @@ -16,7 +16,7 @@ def calculate_fuzzy_point
if self.lat and self.lon
return FuzzyPoint.new(self.lat, self.lon, :point)
end

if self.postcode
district = postcode.split(" ")[0]
district_centre = Geogov.centre_of_district(district)
Expand All @@ -36,14 +36,13 @@ def calculate_fuzzy_point
end

def self.new_from_ip(ip_address)
#remote_location = Geogov.remote_location(ip_address)
new()
# do |gs|
# if remote_location
# gs.country = remote_location['country']
# end
# gs.fuzzy_point = gs.calculate_fuzzy_point
# end
remote_location = Geogov.remote_location(ip_address)
new() do |gs|
if remote_location
gs.country = remote_location['country']
end
gs.fuzzy_point = gs.calculate_fuzzy_point
end
end

def self.new_from_hash(hash)
Expand Down

0 comments on commit cfdc6bd

Please sign in to comment.