I am sending data from view to controller with AJAXand I got this error:
WARNING: Can\'t verify CSRF token authenticity
I think
If you're using javascript with jQuery to generate the token in your form, this works:
Obviously, you need to have the <%= csrf_meta_tag %> in your Ruby layout.
<%= csrf_meta_tag %>