/ Published in: JavaScript
URL: http://railscasts.com/episodes/136-jquery
Adapted from Railscasts
Especially useful in combination with Rails respond_to { |format| format.js }
Expand |
Embed | Plain Text
jQuery.ajaxSetup({ 'beforeSend': function(xhr) {xhr.setRequestHeader("Accept", "text/javascript")} })
Comments
Subscribe to comments
You need to login to post a comment.

Very useful for adding an authorization header when interacting with Google's Data APIs.