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