From 65d5f3a1db5bd2869b2b16006d15b18d6f03cc5d Mon Sep 17 00:00:00 2001 From: Tom Hughes Date: Sun, 24 Nov 2013 12:13:02 +0000 Subject: [PATCH 1/1] 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. --- app/assets/javascripts/application.js | 8 -------- 1 file changed, 8 deletions(-) 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"); -- 2.39.5