Add Rails CSRF protection

I am using Dropzone together with Rails which requires a CSRF token to be sent with every request.
https://github.com/rails/jquery-rails contains a JS file that you can include in your Rails views and that (among other things) automatically adds the required header containing the CSRF token to every Ajax request. (https://github.com/rails/jquery-rails/blob/75bbcb22cc07b59a4597b098e3b2e507cf0c98ad/vendor/assets/javascripts/jquery_ujs.js#L91)
I added a check to Dropzone to use the function from https://github.com/rails/jquery-rails (if present) to add those headers.

I realize you might not want to merge this to support Rails specifically but maybe a callback before sending the request would be an option? (the necessary header could then be added in the callback)