Skip to content

Commit

Permalink
Added pushedData hook to root.deleted.uncommitted state.
Browse files Browse the repository at this point in the history
Resolves emberjs#3023.
  • Loading branch information
simonexmachina committed Apr 28, 2015
1 parent 49f00ab commit 4115cdf
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
1 change: 1 addition & 0 deletions packages/ember-data/lib/system/model/states.js
Original file line number Diff line number Diff line change
Expand Up @@ -633,6 +633,7 @@ var RootState = {
record.triggerLater('ready');
},

pushedData: Ember.K,
becomeDirty: Ember.K,
deleteRecord: Ember.K,

Expand Down
11 changes: 11 additions & 0 deletions packages/ember-data/tests/unit/states-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -87,3 +87,14 @@ test("the deleted.saved state", function() {
isFalse("isSaving");
isTrue("isDeleted");
});

module("unit/states - hooks for record states", {
setup: function() {
rootState = DS.RootState;
}
});

test("root.deleted.uncommitted supports pushedData", function() {
equal(typeof get(rootState, "deleted.uncommitted.pushedData"), 'function',
"root.deleted.uncommitted should be a function");
});

0 comments on commit 4115cdf

Please sign in to comment.