-
Notifications
You must be signed in to change notification settings - Fork 19
Description
When ever we edit a model, we make a copy first to an object, then edit that. This means that a cancel just throws the object away. To help this all computed properties are put in a mixin, only data fields are put in the model. This allows us to add the mixin to an object and simulate the model.
It would be nice to be able to use this addon to copy the data to an object instead of a new model and it looks like that could happen with a very small change where you create the model. It would have been nice if there was a method that just created the attr hash and then used that to apply. That also is easily doable except for the code at 194 using the private API. What is that accomplishing that the attrs[name] = this.get(name); didnt accomplish?
It would also be nice to expose the attrs[] because I could use that to copy the object back to the original model.