Skip to content

Commit

Permalink
Added _updateRecordCacheForType to findAll()
Browse files Browse the repository at this point in the history
  • Loading branch information
aputinski committed Apr 18, 2014
1 parent 4b05e5f commit 9d9bc41
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 9 deletions.
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "emberfire",
"version": "1.0.6",
"version": "1.0.7",
"description": "Firebase bindings for Ember Data",
"main": ["./dist/emberfire.js"],
"dependencies": {
Expand Down
7 changes: 4 additions & 3 deletions dist/emberfire.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
}

var EmberFire = Ember.Namespace.create({
VERSION: '1.0.6'
VERSION: '1.0.7'
});

if (Ember.libraries) {
Expand Down Expand Up @@ -270,7 +270,7 @@
else {
snapshot.forEach(function(childSnapshot) {
var payload = adapter._assignIdToPayload(childSnapshot);
//adapter._updateRecordCacheForType(type, payload);
adapter._updateRecordCacheForType(type, payload);
results.push(payload);
});
adapter._enqueue(resolve, [results]);
Expand Down Expand Up @@ -438,7 +438,8 @@
// Removed
var removedRecords = idsCache.filter(function(id) {
return !ids.contains(id);
}).map(function(id) {
});
removedRecords = Ember.A(removedRecords).map(function(id) {
return adapter._removeHasManyRecord(store, relationship, recordRef, id);
});
// Combine all the saved records
Expand Down
2 changes: 1 addition & 1 deletion dist/emberfire.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "EmberFire",
"version": "1.0.6",
"version": "1.0.7",
"description": "An officially supported Ember binding for Firebase.",
"main": "dist/emberfire.js",
"repository": {
Expand Down
7 changes: 4 additions & 3 deletions src/data.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
}

var EmberFire = Ember.Namespace.create({
VERSION: '1.0.6'
VERSION: '1.0.7'
});

if (Ember.libraries) {
Expand Down Expand Up @@ -270,7 +270,7 @@
else {
snapshot.forEach(function(childSnapshot) {
var payload = adapter._assignIdToPayload(childSnapshot);
//adapter._updateRecordCacheForType(type, payload);
adapter._updateRecordCacheForType(type, payload);
results.push(payload);
});
adapter._enqueue(resolve, [results]);
Expand Down Expand Up @@ -438,7 +438,8 @@
// Removed
var removedRecords = idsCache.filter(function(id) {
return !ids.contains(id);
}).map(function(id) {
});
removedRecords = Ember.A(removedRecords).map(function(id) {
return adapter._removeHasManyRecord(store, relationship, recordRef, id);
});
// Combine all the saved records
Expand Down

0 comments on commit 9d9bc41

Please sign in to comment.