Rollback unsaved changes before route change?


How do I rollback change on route change? If I just leave the page I get the following:

Uncaught Error: Attempted to handle event `loadedData` on <App.SomeModel> while in state rootState.loaded.updated.uncommitted. Called with undefined

If I do the following:

App.SomeModelRoute = Ember.Route.extend({
  deactivate: function(){

I get:

"Attempted to handle event `becameClean` on <App.SomeModel> while in state rootState.loaded.saved. Called with undefined"


Figured it out, need to do


instead of calling rollback() on object directly