lib/world_flags/helper/geo.rb in world-flags-0.6.0 vs lib/world_flags/helper/geo.rb in world-flags-0.6.1
- old
+ new
@@ -5,10 +5,10 @@
module Geo
def self.country_code_from_ip ip = nil
ip ||= request.remote_ip
raise WorldFlags::GeoIPError, "IP address #{ip} is a localhost address" if local_ip?(ip)
- puts "find country code for ip: #{ip}" if debug?
+ # puts "find country code for ip: #{ip}" if debug?
@geoip ||= ::GeoIP.new WorldFlags.geo_ip_db_path
country = @geoip.country(ip)
return country[2] unless country.nil?
rescue Exception => e
\ No newline at end of file