]> git.openstreetmap.org Git - rails.git/commitdiff
Remove code to fixup authenticity tokens on page load
authorTom Hughes <tom@compton.nu>
Sun, 24 Nov 2013 12:13:02 +0000 (12:13 +0000)
committerTom Hughes <tom@compton.nu>
Sun, 24 Nov 2013 12:13:02 +0000 (12:13 +0000)
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

index 2c186c909226a89788088dce891be0312bf1e38b..e5ac811e6724c00f48bcb7adaa750c156d2d5713 100644 (file)
@@ -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");