openstreetmap-website/lib/osm_community_index/resource_backend.rb
Andy Allan bb7f5ac2c8 Switch to using FrozenRecord for loading communities
This allows us to query the records to get the local chapters, which
is more flexible and allows us to use other resources too.
2022-07-27 16:19:08 +01:00

14 lines
276 B
Ruby

# A backend for FrozenRecord
module OsmCommunityIndex
module ResourceBackend
def self.filename(_model)
"resources.json"
end
def self.load(file_path)
resources = JSON.parse(File.read(file_path))
resources["resources"].values
end
end
end