instance method
hash
Ruby on Rails 2.2.3
Since v2.2.3 Last seen in v3.2.22.5Signature
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/base.rb, line 2663
def hash
id.hash
end
Defined in activerecord/lib/active_record/base.rb line 2663
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActiveRecord::Base