Model.RestPersistencenow recognises a 422 response as validation failure and populates the model's errors object with the response data.
Model.errorsis now an object and has a similar interface to ActiveModel.
- Fix that
changesshould only be merged after a successful
- Calling Model#attr() with no arguments returns a combined object of attributes/changes.
- Fix that
Model.RestPersistenceAjax failures should correctly run the supplied callback.
- Collection methods now access the collection through the
allmethod so that
each, etc work as expected if it's overwritten.
- Events are now bound directly to a model rather than using jQuery
bind. Collections also now have the concept of events with "add" and "remove" built-in.
updateshould trigger "update" event, add separate
- Fix that persistence failure should not trigger corresponding event.
- Pass only a single callback to save/destroy which is called with a boolean to indicate success/failure.
- Change behaviour of
Model.Collectionand don't let duplicates (scoped by id) of the same model to be stored. [Laurie Young]
- Fix that setting a null value with
attrshould be read back correctly from
errorsarray shouldn't have to be manually
- First tagged release.