Permalink
Browse files

Merge branch 'master' of github.com:codebrew/backbone-rails

  • Loading branch information...
2 parents c7ac06c + 8b7f59c commit f0e54c35f86423fef48a2f3cc2f57869245dc6df Ryan Fitzgerald committed Sep 29, 2012
Showing with 4 additions and 3 deletions.
  1. +4 −3 vendor/assets/javascripts/backbone_rails_sync.js
@@ -23,9 +23,10 @@
type: type,
dataType: 'json',
beforeSend: function( xhr ) {
- var token = $('meta[name="csrf-token"]').attr('content');
- if (token) xhr.setRequestHeader('X-CSRF-Token', token);
-
+ if (!options.noCSRF) {
+ var token = $('meta[name="csrf-token"]').attr('content');
+ if (token) xhr.setRequestHeader('X-CSRF-Token', token);
+ }
model.trigger('sync:start');
}
}, options);

0 comments on commit f0e54c3

Please sign in to comment.