1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

Fixed bug in Base#hash method that would treat records with the same string-based id as different [Dave Thomas]

git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1039 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
This commit is contained in:
David Heinemeier Hansson 2005-03-30 14:25:29 +00:00
parent ea3016f5d9
commit cfef86c645
2 changed files with 3 additions and 1 deletions

View file

@ -1,5 +1,7 @@
*SVN*
* Fixed bug in Base#hash method that would treat records with the same string-based id as different [Dave Thomas]
* Renamed DateHelper#distance_of_time_in_words_to_now to DateHelper#time_ago_in_words (old method name is still available as a deprecated alias)

View file

@ -1085,7 +1085,7 @@ module ActiveRecord #:nodoc:
# 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) ]
def hash
id
id.hash
end
# For checking respond_to? without searching the attributes (which is faster).