From a2f0468595399ebb2d949a6caa214535d22a26f1 Mon Sep 17 00:00:00 2001 From: Jeremy Ashkenas Date: Sat, 22 Jan 2011 11:46:07 -0500 Subject: [PATCH] merging in fixes for models in multiple collections ... --- index.html | 3 +++ 1 file changed, 3 insertions(+) diff --git a/index.html b/index.html index 067b2900..a6456571 100644 --- a/index.html +++ b/index.html @@ -769,6 +769,8 @@ book.save({author: "F.D.R."}, {error: function(){ ... }}); Destroys the model on the server by delegating an HTTP DELETE request to Backbone.sync. Accepts success and error callbacks in the options hash. + Triggers a "destroy" event on the model, which will bubble up + through any collections that contain it.

@@ -1963,6 +1965,7 @@ var DocumentView = Backbone.View.extend({
       
  • "refresh" (collection) — when the collection's entire contents have been replaced.
  • "change" (model, collection) — when a model's attributes have changed.
  • "change:[attribute]" (model, collection) — when a specific attribute has been updated.
  • +
  • "destrooy" (model, collection) — when a model is destroyed.
  • "error" (model, collection) — when a model's validation fails, or a save call fails on the server.
  • "route:[name]" (controller) — when one of a controller's routes has matched.
  • "all" — this special event fires for any triggered event, passing the event name as the first argument.