<p>In test/integration/cors_test.rb:</p>
<pre style='color:#555'>> @@ -0,0 +1,31 @@
> +require File.dirname(__FILE__) + '/../test_helper'
> +
> +class CORSTest < ActionController::IntegrationTest
> +  # https://github.com/rails/rails/commit/ad46884af567d6f8d6d8d777f372c39e81a560ba
</pre>
<p>My general policy has been to keep all the monkey patches in initializers so that they're all together and I can find them to review them periodically (and especially on rails upgrades) to see if they are still needed.</p>

<p>Given that this is test code, and that we're patching the main class used in the file, it probably makes reasonable sense to do it this way though.</p>

<p>I hate the rails version check though - can we at least do that as a check on whether the <code>options</code> method is already defined?</p>

            <p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">
              —<br>
              Reply to this email directly or <a href='https://github.com/openstreetmap/openstreetmap-website/pull/138/files#r1901218'>view it on GitHub</a>.
            </p>
            <img src='https://github.com/notifications/beacon/uTRSc6ihLa7Shf84BpiOpmLWAu4oQih75mggZl1E8_nNfp_iEXETdQVsjYwMcApp.gif' height='1' width='1'>