instance method
<=>
Ruby on Rails 7.1.6
Since v4.0.13Signature
<=>(other_object)
Allows sort on objects
Parameters
-
other_objectreq
Source
# File activerecord/lib/active_record/core.rb, line 633
def <=>(other_object)
if other_object.is_a?(self.class)
to_key <=> other_object.to_key
else
super
end
end
Defined in activerecord/lib/active_record/core.rb line 633
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActiveRecord::Core