Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create snapshots on save not on flush #3133

Merged
merged 1 commit into from
Jun 1, 2015

Conversation

tchak
Copy link
Member

@tchak tchak commented Jun 1, 2015

alows us to have access to changed attributes in snapshot

cc @igorT @wecc

alows us to have access to changed attributes in snapshot
@@ -2040,7 +2042,7 @@ function _commit(adapter, store, operation, record) {

store._adapterRun(function() {
if (adapterPayload) {
payload = serializer.extract(store, type, adapterPayload, get(record, 'id'), operation);
payload = serializer.extract(store, type, adapterPayload, get(snapshot, 'id'), operation);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since snapshot is a POJO we're doing snapshot.id most places in the codebase.

igorT added a commit that referenced this pull request Jun 1, 2015
Create snapshots on save not on flush
@igorT igorT merged commit 09809f3 into emberjs:master Jun 1, 2015
@igorT
Copy link
Member

igorT commented Jun 1, 2015

Can you add a test for the save and attribute change case?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants