X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/a6b84a0294a2929006ff056f56103be549c5b5a2..d235b12767bba240611fc6452b7508627c56542b:/lib/country.rb diff --git a/lib/country.rb b/lib/country.rb index 48a721a49..f6f679125 100644 --- a/lib/country.rb +++ b/lib/country.rb @@ -9,7 +9,7 @@ class Country @max_lon = max_lon end - def self.find_by_code(code) + def self.find(code) countries[code] end @@ -19,7 +19,7 @@ class Country 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