Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge pull request #577 from tchak/resolve-new-records

new records should resolve the promise
  • Loading branch information...
commit 508479dee764c2e9926487131a5a4814cfda1bf6 2 parents a72ed12 + 5278ae9
@wycats wycats authored
View
3  packages/ember-data/lib/system/store.js
@@ -364,6 +364,9 @@ DS.Store = Ember.Object.extend(DS._Mappable, {
// Set the properties specified on the record.
record.setProperties(properties);
+ // Resolve record promise
+ Ember.run(record, 'resolve', record);
+
return record;
},
View
2  packages/ember-data/tests/unit/store_test.js
@@ -387,6 +387,7 @@ test("all(type) returns a record array of all records of a specific type", funct
});
test("a new record of a particular type is created via store.createRecord(type)", function() {
+ expect(6);
var store = DS.Store.create();
var Person = DS.Model.extend({
name: DS.attr('string')
@@ -409,6 +410,7 @@ test("a new record of a particular type is created via store.createRecord(type)"
});
test("an initial data hash can be provided via store.createRecord(type, hash)", function() {
+ expect(6);
var store = DS.Store.create();
var Person = DS.Model.extend({
name: DS.attr('string')
Please sign in to comment.
Something went wrong with that request. Please try again.