protect_from_forgery & Unobtrusive Javascript
- by Matt Grande
Hi all,
I have some javascript making an ajax call in my Rails site:
$.ajax({type: "PUT", url: url, data: { dummy: data }, complete: function(data) {}});
When Rails gets it, it throws back an ActionController::InvalidAuthenticityToken Error. I'd like to keep the protect_from_forgery stuff in there, if possible... But I'm at a loss for how can…