jashkenas/backbone — pull request #3173 by megawac (2014-06-02 20:27:02+00:00)
Title: Add reset opt-out feature to Collection.initialize

Currently if we want our `initialize` constructor to take `models` and also add models to the collection it will need to do some dirty stuff:

- modify the `models` array if we can assume its an array (e.g. change the array of models as we desire)
- monkey-patch reset
- change the `initialize` for models which change `collection.models` to the form `initialize(falsy, options, models, *args)`

This patch allows it to be nicer, instead `initialize(models, options, *args)`. If `initialize` returns `false`, we simply won't call `reset` and `initialize` will be responsible for adding the `models`.