An open API service indexing awesome lists of open source software.

https://github.com/movableink/buffered-proxy

Ember mixin for buffering changes to an ObjectProxy
https://github.com/movableink/buffered-proxy

Last synced: 5 months ago
JSON representation

Ember mixin for buffering changes to an ObjectProxy

Awesome Lists containing this project

README

          

BufferedProxy
=============

Proxy object for easy rollbacks.

Usage
=====

```
var FooController = Ember.ObjectController.extend({
bufferedContent: function() {
return Em.ObjectProxy.extend(BufferedProxy).create({
content: this.get('content')
});
}.property('content'),

actions: {
save: function() {
this.get('bufferedContent').applyBufferedChanges();
},

cancel: function() {
this.get('bufferedContent').discardBufferedChanges();
}
}
});
```

About
=====

Written by Kris Selden for Yapp Labs, published by Luke Melia.