Method: WorldFlags::Helper::Locale#get_country_by_ip

Defined in:
lib/world_flags/helper/locale.rb

#get_country_by_ipObject



44
45
46
47
48
# File 'lib/world_flags/helper/locale.rb', line 44

def get_country_by_ip
  country_code_from_ip browser_ip
rescue WorldFlags::GeoIPError
  I18n.default_locale
end