Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Promote
clear_attribute_change
as attribute methods
For now, `increment` with aliased attribute does work, but `increment!` with aliased attribute does not work, due to `clear_attribute_change` is not aware of attribute aliases. We sometimes partially updates specific attributes in dirties, at that time it relies on `clear_attribute_change` to clear partially updated attribute dirties. If `clear_attribute_change` is not attribute method unlike others, we need to resolve attribute aliases manually only for `clear_attribute_change`, it is a little inconvinient for me. From another point of view, we have `restore_attributes`, `restore_attribute!`, `clear_attribute_changes`, and `clear_attribute_change`. Despite almost similar features `restore_attribute!` is an attribute method but `clear_attribute_change` is not. Given the above, I'd like to promote `clear_attribute_change` as attribute methods to fix issues caused by the inconsisteny.
- Loading branch information
Showing
5 changed files
with
35 additions
and
3 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
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