[openstreetmap/openstreetmap-website] Add Communities page (#3301)
Andy Allan
notifications at github.com
Wed Mar 2 16:54:14 UTC 2022
@gravitystorm commented on this pull request.
> @@ -0,0 +1,64 @@
+module OsmCommunityIndex
+ class LocalChapter
+ attr_reader :id, :url
+
+ def initialize(id, url)
+ @id = id
+ @url = url
+ end
+
+ def self.local_chapters
+ @chapters = init_local_chapters
This has two problems - it's not actually memoising (should be `||=`) and it's using a class variable which is not thread safe. Although that doesn't matter here (perhaps), if we include it someone else will copy this approach elsewhere at some point.
--
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/3301#pullrequestreview-897866319
You are receiving this because you are subscribed to this thread.
Message ID: <openstreetmap/openstreetmap-website/pull/3301/review/897866319 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20220302/9d77085e/attachment-0001.htm>
More information about the rails-dev
mailing list