-
Notifications
You must be signed in to change notification settings - Fork 5.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update dirty tracking to support Mongoid 8.0+
It appears Mongoid 8.0+ slightly [changed dirty tracking] behavior to more closely match Active Model/Record, however they haven't yet introduced the [new methods] that match the latest API, that seems to be coming on Mongoid 8.1 only. The changes here try to accommodate for that by determining which "attribute_changed?" method to call depending on whether the "*_previously_*" version exists. Newer versions of AR (5.1+) will continue to use the new API / methods, whereas previous versions and Mongoid 8.0+ will use these tweaked versions. No behavior should change for AR, but it will hopefully support Mongoid 8.0+ now. [changed dirty tracking] mongodb/mongoid#5092 [new methods] mongodb/mongoid#5440
- Loading branch information
1 parent
7a8c2dd
commit d9eb3a5
Showing
3 changed files
with
35 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters