Last active
December 15, 2015 13:19
-
-
Save askehansen/5266409 to your computer and use it in GitHub Desktop.
jQuery ajax setup for Ruby on Rails
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$.ajaxSetup( | |
{ | |
contentType: "application/json; charset=utf-8", | |
dataType: "json", | |
headers: { "X-CSRF-Token": $("meta[name='csrf-token']").attr("content") }, | |
type:"POST" | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment