lib/ine/places/autonomous_regions_collection.rb in ine-places-0.5.0 vs lib/ine/places/autonomous_regions_collection.rb in ine-places-0.6.0
- old
+ new
@@ -1,9 +1,9 @@
class INE::Places::AutonomousRegionsCollection
include Singleton
def self.records
- @records ||= CSV.read("#{INE::Places::ROOT}/data/autonomous_regions.csv", headers: true).map do |raw_data|
+ @records ||= CSV.read("#{INE::Places::ROOT}/data/autonomous_regions.csv", headers: true, encoding: 'utf-8').map do |raw_data|
build_from_raw_data(raw_data)
end.sort_by(&:slug)
end
def self.build_from_raw_data(raw_data)