Skip to content

Reset tracking before calling callback on model in save method#18

Open
kirach wants to merge 3 commits into
nytimes:masterfrom
Nitka:master
Open

Reset tracking before calling callback on model in save method#18
kirach wants to merge 3 commits into
nytimes:masterfrom
Nitka:master

Conversation

@kirach

@kirach kirach commented Nov 21, 2014

Copy link
Copy Markdown

Model tracking should be reset before calling old success callback during save method. For now, this example from documentation doesn't work:

model.save({}, {
    success: function() {
        console.log(model.unsavedAttributes());  // >> false
    }
});

because we call success and then reset tracking. This PR solve this problem.

Thanks.

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.

1 participant