From d20632de9c55e8389b00c82cbb83da7c92c90146 Mon Sep 17 00:00:00 2001 From: Andy Allan Date: Wed, 10 Aug 2022 13:48:27 +0100 Subject: [PATCH] Restrict files read from directory --- lib/osm_community_index.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/osm_community_index.rb b/lib/osm_community_index.rb index 1e868580d..baee381d0 100644 --- a/lib/osm_community_index.rb +++ b/lib/osm_community_index.rb @@ -1,7 +1,7 @@ module OsmCommunityIndex def self.add_to_i18n communities = Community.all - files = Dir.glob(Rails.root.join("node_modules/osm-community-index/i18n/*")) + files = Dir.glob(Rails.root.join("node_modules/osm-community-index/i18n/*.yaml")) files.each do |file| locale = File.basename(file, ".yaml") community_locale_yaml = YAML.safe_load(File.read(file))[locale] -- 2.39.5