Skip to content

Conversation

@nneufeld
Copy link

As per the backbone documentation for model.save(http://backbonejs.org/#Model-save)

If instead, you'd only like the changed attributes to be sent to the server, call model.save(attrs, {patch: true}). You'll get an HTTP PATCH request to the server with just the passed-in attributes.

This currently doesn't work when including backbone_rails_sync, as the data option was always being set to model.toJSON, which returns all the model's attributes, when in fact it should be set to options.attrs if it's present, which contains only the attributes that have been changed when using the patch option.

… sent to the server rather than the entire model.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant