instance method
==
Ruby on Rails 6.1.7.10
Since v3.0.20Signature
==(other)
Compares two relations for equality.
Parameters
-
otherreq
Source
# File activerecord/lib/active_record/relation.rb, line 701
def ==(other)
case other
when Associations::CollectionProxy, AssociationRelation
self == other.records
when Relation
other.to_sql == to_sql
when Array
records == other
end
end
Defined in activerecord/lib/active_record/relation.rb line 701
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActiveRecord::Relation