Method: Mongoid::Document#hash
- Defined in:
- lib/mongoid/document.rb
#hash ⇒ Integer
Delegates to identity in order to allow two records of the same identity to work with something like:
[ Person.find(1), Person.find(2), Person.find(3) ] &
[ Person.find(1), Person.find(4) ] # => [ Person.find(1) ]
75 76 77 |
# File 'lib/mongoid/document.rb', line 75 def hash identity.hash end |