
dirty-ness tracking breaks when property clean -> dirty -> clean -> dirty.
Reported by Jordan Ritter | October 26th, 2009 @ 03:32 PM
Dirty attribute tracking gets confused when Model instance properties are repeatedly assigned values that switch between the clean (original) value and a dirty (new) value. When property is assigned back its original value, it still reports as dirty; a subsequent assignment of a dirty value to the property sets it to clean.
Repro script and output: https://gist.github.com/69d5361e33caf84f7fa5
dm-core.git @ 911589
Comments and changes to this ticket
-
Dan Kubb (dkubb) October 27th, 2009 @ 01:31 AM
- State changed from new to resolved
(from [c71674151f6e5f39d2208605b30e706af02a48a8]) Fixed dirtiness tracking bug for unchanged attributes
- Previously if a value was modified, then changed back to the original the resource would incorrectly be flagged as dirty. This is fixed.
- Added specs for Resource#dirty_attributes
- Added specs for Resource#original_attributes
[#1109 state:resolved] http://github.com/datamapper/dm-core/commit/c71674151f6e5f39d220860...
Please Sign in or create a free account to add a new ticket.
With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile »
People watching this ticket
Referenced by
-
1109 dirty-ness tracking breaks when property clean -> dirty -> clean -> dirty. [#1109 state:resolved] http://github.com/datamapper/dm-c...