<p dir="auto">This is an alternative to <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="1512724146" data-permission-text="Title is private" data-url="https://github.com/openstreetmap/openstreetmap-website/issues/3861" data-hovercard-type="pull_request" data-hovercard-url="/openstreetmap/openstreetmap-website/pull/3861/hovercard" href="https://github.com/openstreetmap/openstreetmap-website/pull/3861">#3861</a> to <span class="issue-keyword tooltipped tooltipped-se" aria-label="This pull request closes issue #3858.">fix</span> <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="1510427051" data-permission-text="Title is private" data-url="https://github.com/openstreetmap/openstreetmap-website/issues/3858" data-hovercard-type="issue" data-hovercard-url="/openstreetmap/openstreetmap-website/issues/3858/hovercard" href="https://github.com/openstreetmap/openstreetmap-website/issues/3858">#3858</a> and allow offline mode to be used with the community index.</p>
<p dir="auto">It turns out that while it used to be necessary to stop <code class="notranslate">ActiveRecord</code> loading because it would immediately try and connect the database that is no longer the case as the introduction of switchable database connections means it now only connects when a model is used for the first time.</p>
<p dir="auto">So we can in fact just get rid of a load of nasty code, part of which involves copying a list of loads from the rails code which then gets out of sync with rails over time.</p>
<hr>
<h4>You can view, comment on, or merge this pull request online at:</h4>
<p> <a href='https://github.com/openstreetmap/openstreetmap-website/pull/3874'>https://github.com/openstreetmap/openstreetmap-website/pull/3874</a></p>
<h4>Commit Summary</h4>
<ul>
<li><a href="https://github.com/openstreetmap/openstreetmap-website/pull/3874/commits/4a5d509adf6f5c13b42bcfbb70a9fe24245ea149" class="commit-link">4a5d509</a> Allow models to load when the database is offline</li>
</ul>
<h4 style="display: inline-block">File Changes </h4> <p style="display: inline-block">(<a href="https://github.com/openstreetmap/openstreetmap-website/pull/3874/files">1 file</a>)</p>
<ul>
<li>
<strong>M</strong>
<a href="https://github.com/openstreetmap/openstreetmap-website/pull/3874/files#diff-c1fd91cb1911a0512578b99f657554526f3e1421decdb9e908712beab57e10f9">config/application.rb</a>
(17)
</li>
</ul>
<h4>Patch Links:</h4>
<ul>
<li><a href='https://github.com/openstreetmap/openstreetmap-website/pull/3874.patch'>https://github.com/openstreetmap/openstreetmap-website/pull/3874.patch</a></li>
<li><a href='https://github.com/openstreetmap/openstreetmap-website/pull/3874.diff'>https://github.com/openstreetmap/openstreetmap-website/pull/3874.diff</a></li>
</ul>
<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />Reply to this email directly, <a href="https://github.com/openstreetmap/openstreetmap-website/pull/3874">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AAK2OLPRYFTZM3DEA7YRMTDWQ4VDTANCNFSM6AAAAAATSLGWYA">unsubscribe</a>.<br />You are receiving this because you are subscribed to this thread.<img src="https://github.com/notifications/beacon/AAK2OLNZXQQRLGR4OW4Y7QDWQ4VDTA5CNFSM6AAAAAATSLGWYCWGG33NNVSW45C7OR4XAZNFJFZXG5LFVJRW63LNMVXHIX3JMTHFVLRQOA.gif" height="1" width="1" alt="" /><span style="color: transparent; font-size: 0; display: none; visibility: hidden; overflow: hidden; opacity: 0; width: 0; height: 0; max-width: 0; max-height: 0; mso-hide: all">Message ID: <span><openstreetmap/openstreetmap-website/pull/3874</span><span>@</span><span>github</span><span>.</span><span>com></span></span></p>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/openstreetmap/openstreetmap-website/pull/3874",
"url": "https://github.com/openstreetmap/openstreetmap-website/pull/3874",
"name": "View Pull Request"
},
"description": "View this Pull Request on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>