X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/aa1fb6dbb8c2e71b8ce8c231ae1272a2dfebd75a..33d6580f414714408f74872ab9ef5b73c4b92972:/lib/country.rb diff --git a/lib/country.rb b/lib/country.rb index 3af7e0a21..ca547a972 100644 --- a/lib/country.rb +++ b/lib/country.rb @@ -19,7 +19,7 @@ class Country def self.load_countries countries = {} - xml = REXML::Document.new(File.read("config/countries.xml")) + xml = REXML::Document.new(Rails.root.join("config/countries.xml").read) xml.elements.each("geonames/country") do |ele| code = ele.get_text("countryCode").to_s