[openstreetmap-website] Allow cross-origin request to API (#138)

Tom Hughes notifications at github.com
Mon Oct 22 08:48:38 GMT 2012


> @@ -0,0 +1,31 @@
> +require File.dirname(__FILE__) + '/../test_helper'
> +
> +class CORSTest < ActionController::IntegrationTest
> +  # https://github.com/rails/rails/commit/ad46884af567d6f8d6d8d777f372c39e81a560ba

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.

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.

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

---
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/138/files#r1901218
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20121022/89f30f20/attachment-0001.html>


More information about the rails-dev mailing list