From 85fbb22f071b96d5a20ac71dc16d4432c08cdcf3 Mon Sep 17 00:00:00 2001 From: David Heinemeier Hansson Date: Tue, 5 Sep 2006 18:54:24 +0000 Subject: Backed out of new_record? to new? transformation as it would screw up existing models that did boolean calls on "new" attributes [DHH] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5018 5ecf4fe2-1ee6-0310-87b1-e25e094e27de --- .../active_record/associations/belongs_to_polymorphic_association.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'activerecord/lib/active_record/associations/belongs_to_polymorphic_association.rb') diff --git a/activerecord/lib/active_record/associations/belongs_to_polymorphic_association.rb b/activerecord/lib/active_record/associations/belongs_to_polymorphic_association.rb index 0a71fa89c9..9549b959fc 100644 --- a/activerecord/lib/active_record/associations/belongs_to_polymorphic_association.rb +++ b/activerecord/lib/active_record/associations/belongs_to_polymorphic_association.rb @@ -7,7 +7,7 @@ module ActiveRecord else @target = (AssociationProxy === record ? record.target : record) - unless record.new? + unless record.new_record? @owner[@reflection.primary_key_name] = record.id @owner[@reflection.options[:foreign_type]] = record.class.base_class.name.to_s end -- cgit v1.2.3