Posting to Rails with AJAX

Don’t forget your csrf token!

How to do it in Javascript.

The token itself can be retrieved in Rails with: session[:_csrf_token]


Leave a Reply

Your email address will not be published. Required fields are marked *