mavenlink/brainstem-js — pull request #15 by dentafrice (2013-11-26 01:54:41+00:00)
Title: Add the parsing model to the storage manager instead of creating a new o...

This solves a bug for this workflow:

1) Creating a new `Brainstem.Model`
2) Saving it to the server.
3) Expecting the instance of the `Brainstem.Model` that you created to be added to the `storageManager`

**Example:**

var myModel = new Mavenlink.Models.Story(); // Brainstem Model
myModel.save({ title: "Foo" });

Prior to this patch `myModel` would never get added to the `storageManager` but instead `Brainstem.Model#updateStorageManager` would create a new model with the attributes.

This patch modifies the behavior of `Brainstem.Model#updateStorageManager` to set the attributes on `myModel` and add it to the `storageManager` instead of creating a new one.