mirror of
https://github.com/ENSL/ensl.org.git
synced 2024-12-28 13:31:06 +00:00
Read country code from I18n gem
This commit is contained in:
parent
e6c2ebcbc3
commit
453874b630
1 changed files with 4 additions and 3 deletions
|
@ -140,11 +140,12 @@ class User < ActiveRecord::Base
|
|||
end
|
||||
|
||||
def country_s
|
||||
CountryCodeSelect::Countries::COUNTRIES.each do |c|
|
||||
if c[1] == country
|
||||
return c[0]
|
||||
I18nCountrySelect::Countries::COUNTRY_CODES.each do |code|
|
||||
if code == country
|
||||
return I18n.t(code, :scope => :countries, :default => 'missing')
|
||||
end
|
||||
end
|
||||
|
||||
country
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in a new issue