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

Better sync with ActiveRecord attributes; removal of AttrJson::Record::Dirty #163

Merged
merged 9 commits into from
Dec 22, 2022

Conversation

jrochkind
Copy link
Owner

@jrochkind jrochkind commented Dec 21, 2022

  • When we sync better, we can get dirty tracking mostly working. So we can remove our buggy custom AttrJson::Record::Dirty dirty tracking. That feature will be gone in attr_json 2.0 (It was pretty broken, see AttrJson::Record::Dirty: #will_save_change_to returns true when other attribute was changed #148)

  • We have a test suite verifying ActiveRecord dirty tracking is working, even with in-place mutations.

  • In process, we noticed that AttrJson::Type::Array was not properly tracking mutation changes in place. Fixed that.

Except using standard rails dirty tracking now. Just being sure it's good.
We sync rails attributes better, to use standard rails dirty tracking. Our own custom dirty tracking was actually pretty badly broken anyhow, ref #148
@jrochkind jrochkind added the v2 label Dec 21, 2022
@jrochkind jrochkind marked this pull request as ready for review December 22, 2022 16:04
@jrochkind jrochkind merged commit 5e7179d into dev_v2 Dec 22, 2022
@jrochkind jrochkind deleted the cleaner_rails_attribute branch January 24, 2023 17:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant