Best way to rollback all changes to an Ember Data model
<p>I am using ember-data to edit a user with automatic model resolution</p>

<pre><code>this.route('user', function() {
  this.route('edit', { path: ':user_id'})
});
</code></pre>

<p>This works fine and the user can modify all aspects of the model <code>DS.attribute</code>, <code>DS.belongsTo</code> and <code>DS.hasMany</code>.</p>

<p>The user can navigate away in a number of ways, in which case all changes should be removed from the model.</p>

<ul>
<li>Clicking a  <code>Cancel</code> button</li>
<li>Clicking the <code>Broswer Back</code> button</li>
<li>Clicking the <code>Save</code> button, the remote request <code>fails</code>, then navigating away from the page.</li>
<li>Just Clicking some other link on the page which takes them somewhere else.</li>
</ul>

<p>The changes should only be applied if the user explicitly wants them to by clicking the <code>Save</code> button and the server request is successful.</p>

<p>I considered using <a href="https://github.com/yapplabs/ember-buffered-proxy" rel="nofollow">ember-buffered-proxy</a> but I am not sure how this will cope with DS.belongsTo and DS.hasMany relationships.  Regardless, before saving the model I will need to do  <code>buffer.applyBufferedChanges();</code> before saving and if the server fails I am in the save situation as before.</p>

<p>The <code>willTransition</code> hook in the route seems like the obvious place to do this but how can I ensure all changes are removed from the model given <code>rollbackAttributes()</code> only works for <code>DS.attribute</code> controls.</p>