csv_country_selector 1.0.4 → 1.0.5
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/csv_country_selector/version.rb +1 -1
- data/lib/csv_country_selector.rb +1 -1
- metadata +1 -1
data/lib/csv_country_selector.rb
CHANGED
@@ -8,7 +8,7 @@ module CsvCountrySelector
|
|
8
8
|
|
9
9
|
#CSV Tabelle als Masterfreferenz
|
10
10
|
#Lnd;Kfz;Sprache;ISO-Code;Kurzbez;Bezeichnung;Nationalität;Bezeichnung lang
|
11
|
-
@@codes = CSV.read("#{File.dirname(File.expand_path(__FILE__))}/csv_country_selector/countries.csv", :col_sep => ";").inject({}){|a,b| a.merge!({b[0].
|
11
|
+
@@codes = CSV.read("#{File.dirname(File.expand_path(__FILE__))}/csv_country_selector/countries.csv", :col_sep => ";").inject({}){|a,b| a.merge!({b[0].force_encoding('UTF-8') => b[5].force_encoding('UTF-8')})}
|
12
12
|
|
13
13
|
def self.short_name_for(name)
|
14
14
|
@@codes.select{|k,v| v.downcase == name.downcase}.try(:first).try(:first)
|