-
Notifications
You must be signed in to change notification settings - Fork 21.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
I want to be able to compare identity checks with == method. Because I want to compare attribute identities, but currently I have to go through the attribute method. I wanted to use AttributeSet#== for the comparison to avoid creating unnecessary objects, but since it does not return true if the value before type cast are different, I used Attributes#attributes instead. ```ruby # before UserModel.new(id: 1) == UserModel.new(id: 1) # false # after UserModel.new(id: 1) == UserModel.new(id: 1) # true ``` *aaasa*
- Loading branch information
1 parent
994bce4
commit 9b73de4
Showing
3 changed files
with
61 additions
and
0 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