From: Tom Hughes Date: Sun, 24 Nov 2013 12:13:02 +0000 (+0000) Subject: Remove code to fixup authenticity tokens on page load X-Git-Tag: live~4668^2~24 X-Git-Url: https://git.openstreetmap.org/rails.git/commitdiff_plain/65d5f3a1db5bd2869b2b16006d15b18d6f03cc5d?ds=inline Remove code to fixup authenticity tokens on page load We don't cache anything with forms in now, so the code is no longer needed and the comment was now misleading as extra code has been added to the ready callback. --- diff --git a/app/assets/javascripts/application.js b/app/assets/javascripts/application.js index 2c186c909..e5ac811e6 100644 --- a/app/assets/javascripts/application.js +++ b/app/assets/javascripts/application.js @@ -121,15 +121,7 @@ function minimiseMap() { $("#content").removeClass("maximised"); } -/* - * Forms which have been cached by rails may have the wrong - * authenticity token, so patch up any forms with the correct - * token taken from the page header. - */ $(document).ready(function () { - var auth_token = $("meta[name=csrf-token]").attr("content"); - $("form input[name=authenticity_token]").val(auth_token); - $("#menu-icon").on("click", function(e) { e.preventDefault(); $("header").toggleClass("closed");