From cfef86c6454482993872557eb57b2a37e0fefdd5 Mon Sep 17 00:00:00 2001 From: David Heinemeier Hansson Date: Wed, 30 Mar 2005 14:25:29 +0000 Subject: 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 --- activerecord/lib/active_record/base.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'activerecord/lib/active_record') diff --git a/activerecord/lib/active_record/base.rb b/activerecord/lib/active_record/base.rb index f5a531c8ba..bba321dd9b 100755 --- a/activerecord/lib/active_record/base.rb +++ b/activerecord/lib/active_record/base.rb @@ -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). -- cgit v1.2.3