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

Embedded associations remain dirty after saving new record #382

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

danii1
Copy link

@danii1 danii1 commented Jun 15, 2014

Setting _dirtyAttributes in didCreateRecord blocks execution of _copyDirtyAttributesToData in didSaveRecord which resets _dirtyAttributes also in hasMany/belongsTo associations. This leads to bugs: after saving newly created record, associations remain dirty while parent object is clean. Fix is simple, just rely on didSaveRecord to do all cleanup.

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

Successfully merging this pull request may close these issues.

2 participants