Read country code from I18n gem

This commit is contained in:
Luke Barratt 2015-08-15 23:30:34 +01:00
parent e6c2ebcbc3
commit 453874b630

View file

@ -140,11 +140,12 @@ class User < ActiveRecord::Base
end end
def country_s def country_s
CountryCodeSelect::Countries::COUNTRIES.each do |c| I18nCountrySelect::Countries::COUNTRY_CODES.each do |code|
if c[1] == country if code == country
return c[0] return I18n.t(code, :scope => :countries, :default => 'missing')
end end
end end
country country
end end