logicalparadox/backbone.iobind — Issue #16: iosync does not allow to pass options via Collection.fetch()
Author: sebastianhoitz
Created: 2012-03-09 22:01:19+00:00
State: open

In Backbone you can pass options to the server via the fetch method.

This could contain relevant information like what models to fetch.

Right now, the current sync() method implementation overwrites this data with the JSON representation of a given model.
This should be refactored, so that the model data is passed along with the given fetch options.

This is how we implemented it in a quick hack:

params.data = params.data || {};
params.data.model = model.toJSON() || {};