]> git.openstreetmap.org Git - rails.git/blobdiff - lib/country.rb
Merge remote-tracking branch 'upstream/pull/2983' into master
[rails.git] / lib / country.rb
index 3af7e0a211cb70e358c9ade41eeead922d009838..f6f6791252524e4e1e739d923de3aec138859f75 100644 (file)
@@ -19,7 +19,7 @@ class Country
 
   def self.load_countries
     countries = {}
 
   def self.load_countries
     countries = {}
-    xml = REXML::Document.new(File.read("config/countries.xml"))
+    xml = REXML::Document.new(File.read(Rails.root.join("config/countries.xml")))
 
     xml.elements.each("geonames/country") do |ele|
       code = ele.get_text("countryCode").to_s
 
     xml.elements.each("geonames/country") do |ele|
       code = ele.get_text("countryCode").to_s