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
|
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
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue