just alias eql? to == for frewer method calls
This commit is contained in:
parent
f7bd07b62a
commit
2545da6dd6
@ -1789,11 +1789,7 @@ def ==(comparison_object)
|
||||
id.present? &&
|
||||
comparison_object.id == id
|
||||
end
|
||||
|
||||
# Delegates to ==
|
||||
def eql?(comparison_object)
|
||||
self == comparison_object
|
||||
end
|
||||
alias :eql? :==
|
||||
|
||||
# Delegates to id in order to allow two records of the same type and id to work with something like:
|
||||
# [ Person.find(1), Person.find(2), Person.find(3) ] & [ Person.find(1), Person.find(4) ] # => [ Person.find(1) ]
|
||||
|
Loading…
Reference in New Issue
Block a user