codebrew/backbone-rails — pull request #178 by nneufeld (2014-09-23 13:34:37+00:00)
Title: Fix PATCH support in sync function

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.