Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

If an ajax request is being sent then

HTTP_ACCEPT must have text/javascript.

Fixes #52
  • Loading branch information...
commit b6a3500bfb4b845d2c5e2f81b3c57a62fffd0845 1 parent ff185db
@neerajdotname neerajdotname authored
Showing with 1 addition and 0 deletions.
  1. +1 −0  src/rails.js
View
1  src/rails.js
@@ -54,6 +54,7 @@ jQuery(function ($) {
dataType: dataType,
type: method.toUpperCase(),
beforeSend: function (xhr) {
+ xhr.setRequestHeader("Accept", "text/javascript");
el.trigger('ajax:loading', xhr);
},
success: function (data, status, xhr) {
Please sign in to comment.
Something went wrong with that request. Please try again.