Permalink
Browse files

Fixed input name selector in csrf form update

  • Loading branch information...
1 parent bb13c9d commit 7a4c6f4c96136b8ac037972763b08c4a797efb54 @JangoSteve JangoSteve committed Apr 25, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 src/rails.js
View
@@ -378,7 +378,7 @@
// making sure that all forms have actual up-to-date token(cached forms contain old one)
csrf_token = $('meta[name=csrf-token]').attr('content');
csrf_param = $('meta[name=csrf-param]').attr('content');
- $('form input[name='+csrf_param+']').val(csrf_token);
+ $('form input[name="' + csrf_param + '"]').val(csrf_token);
});
})( jQuery );

0 comments on commit 7a4c6f4

Please sign in to comment.