mirror of
https://github.com/github/rails.git
synced 2026-04-26 03:00:59 -04: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:
@@ -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)
|
||||
|
||||
|
||||
|
||||
@@ -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).
|
||||
|
||||
Reference in New Issue
Block a user