From 116cfe2f4d2b49600db2f24a6d02d12b6bf3fc52 Mon Sep 17 00:00:00 2001 From: Adam Hoyle Date: Wed, 11 Aug 2021 23:45:58 +0100 Subject: [PATCH] render local chapters in html --- app/models/communities.rb | 4 ++-- app/views/site/communities.html.erb | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/models/communities.rb b/app/models/communities.rb index d09d62d6a..2379c59ad 100644 --- a/app/models/communities.rb +++ b/app/models/communities.rb @@ -23,8 +23,8 @@ class Communities community_index['features'].each do |feature| feature['properties']['resources'].each do |id, data| data.each do |key, value| - if key == "type" and value == "osm-lc" - array_of_entries.push(id); + if key == "type" and value == "osm-lc" and data['strings']['community'] + array_of_entries.push({ id: id, name: data['strings']['community'], url: data['strings']['url'] }); end end end diff --git a/app/views/site/communities.html.erb b/app/views/site/communities.html.erb index ad431d849..b92b3140c 100644 --- a/app/views/site/communities.html.erb +++ b/app/views/site/communities.html.erb @@ -11,7 +11,7 @@

<%= t ".local_chapters.list_text", :locale => @locale %>

<%= t ".other_groups.title", :locale => @locale %>

-- 2.39.5