[openstreetmap/openstreetmap-website] Add Communities page (#3301)

Andy Allan notifications at github.com
Wed Mar 2 17:35:38 UTC 2022


@gravitystorm commented on this pull request.



> +  class LocalChapter
+    attr_reader :id, :url
+
+    def initialize(id, url)
+      @id = id
+      @url = url
+    end
+
+    def self.local_chapters
+      @chapters = init_local_chapters
+    end
+
+    def self.init_local_chapters
+      raw_local_chapters = load_raw_local_chapters
+      local_chapters = []
+      raw_local_chapters.each do |chapter|

`map` rather than `foo = [] ... each ... foo.push(bar)` to make this easier to read

-- 
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/3301#pullrequestreview-897922404
You are receiving this because you are subscribed to this thread.

Message ID: <openstreetmap/openstreetmap-website/pull/3301/review/897922404 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20220302/f82958ab/attachment.htm>


More information about the rails-dev mailing list