instance method
hash
Ruby on Rails 4.0.13
Since v4.0.13Signature
hash()
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) ]
Source
# File activerecord/lib/active_record/core.rb, line 301
def hash
id.hash
end
Defined in activerecord/lib/active_record/core.rb line 301
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActiveRecord::Core