Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

toJSON is called implicitly. #1152

Merged
merged 1 commit into from

2 participants

@braddunbar
Collaborator

In the spirit of #1146...

@jashkenas
Owner

Naturally. Nice catch.

@jashkenas jashkenas merged commit fd4df5a into jashkenas:master
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Mar 29, 2012
  1. @braddunbar
This page is out of date. Refresh to see the latest.
Showing with 1 addition and 1 deletion.
  1. +1 −1  backbone.js
View
2  backbone.js
@@ -1329,7 +1329,7 @@
// Ensure that we have the appropriate request data.
if (!options.data && model && (method == 'create' || method == 'update')) {
params.contentType = 'application/json';
- params.data = JSON.stringify(model.toJSON());
+ params.data = JSON.stringify(model);
}
// For older servers, emulate JSON by encoding the request into an HTML-form.
Something went wrong with that request. Please try again.