<p></p>
<p><b>@atomoil</b> commented on this pull request.</p>

<hr>

<p>In <a href="https://github.com/openstreetmap/openstreetmap-website/pull/3301#discussion_r730481967">lib/osm_community_index/local_chapter.rb</a>:</p>
<pre style='color:#555'>> @@ -0,0 +1,39 @@
+module OsmCommunityIndex
+  class LocalChapter
</pre>
<p>I don't have strong feelings on exactly where the code should go, so I am happy to follow whatever structure works best for everyone.</p>
<p>But seeing as you ask...</p>
<p>Initially I was focusing on getting something running and models felt like the right place to the local_chapter data, but I didn't think too much about it. Following the first bit of feedback...</p>
<blockquote>
<p>This is just a few high level thoughts - the view stuff looks reasonably sane but while I haven't tried to understand the model stuff in detail yet it all looks pretty odd to me.</p>
</blockquote>
<p>...I took a closer look at the codebase and realised that all of the models in the models folder represent database records, whereas this piece is closer to <code>lib/country.rb</code> which references a static xml file, and so I figured lib was a better place to put it.</p>
<p>Also I refactored the core JSON handling into <code>osm_community_index</code> to keep it separate from the specific <code>local_chapter</code> data, on the basis that osm_community_index contains more information than just local chapter information, and so <em>maybe</em> in the future that might help, but mainly it just felt <em>a bit wrong</em> to have a local_chapter model deal with a lot of file handling (including the localisation files).</p>
<p>As I say, I'm more than happy to follow whatever pattern/structure that feels right to you.</p>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />You are receiving this because you are subscribed to this thread.<br />Reply to this email directly, <a href="https://github.com/openstreetmap/openstreetmap-website/pull/3301#discussion_r730481967">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AAK2OLP4DGHAXII7XTZF3STUHNALPANCNFSM5CXUIRLQ">unsubscribe</a>.<br />Triage notifications on the go with GitHub Mobile for <a href="https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675">iOS</a> or <a href="https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub">Android</a>.
<img src="https://github.com/notifications/beacon/AAK2OLMBJSBMEJMSBKCN2C3UHNALPA5CNFSM5CXUIRL2YY3PNVWWK3TUL52HS4DFWFIHK3DMKJSXC5LFON2FEZLWNFSXPKTDN5WW2ZLOORPWSZGOF2KKMGA.gif" height="1" width="1" alt="" /></p>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/openstreetmap/openstreetmap-website/pull/3301#discussion_r730481967",
"url": "https://github.com/openstreetmap/openstreetmap-website/pull/3301#discussion_r730481967",
"name": "View Pull Request"
},
"description": "View this Pull Request on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>