From 460eb83de0579c36d96410e48a1385987ad0020c Mon Sep 17 00:00:00 2001 From: Aaron Patterson Date: Wed, 18 Sep 2013 16:14:41 -0700 Subject: support objects with blank string primary keys --- activerecord/lib/active_record/core.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'activerecord/lib') diff --git a/activerecord/lib/active_record/core.rb b/activerecord/lib/active_record/core.rb index 0bc6933918..5e6fee52f7 100644 --- a/activerecord/lib/active_record/core.rb +++ b/activerecord/lib/active_record/core.rb @@ -284,7 +284,7 @@ module ActiveRecord def ==(comparison_object) super || comparison_object.instance_of?(self.class) && - id.present? && + id && comparison_object.id == id end alias :eql? :== -- cgit v1.2.3