Sha256: 0b343b5fdc1519da480efe69adf2358d795d4e5ea7a94cb875a518ead7dd01d3

Contents?: true

Size: 737 Bytes

Versions: 2

Compression:

Stored size: 737 Bytes

Contents

Index: activerecord/lib/active_record/associations/belongs_to_polymorphic_association.rb
===================================================================
--- activerecord/lib/active_record/associations/belongs_to_polymorphic_association.rb	(revision 1320)
+++ activerecord/lib/active_record/associations/belongs_to_polymorphic_association.rb	(working copy)
@@ -8,7 +8,7 @@
           @target = (AssociationProxy === record ? record.target : record)
 
           @owner[@reflection.primary_key_name] = record_id(record)
-          @owner[@reflection.options[:foreign_type]] = record.class.base_class.name.to_s
+          @owner[@reflection.options[:foreign_type]] = record.class.sti_name.to_s
 
           @updated = true
         end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
store_base_sti_class_for_3_0-0.1.3 polymorphic_and_sti_fix_for_rails_2.3-2.diff
store_base_sti_class_for_3_0-0.1.2 polymorphic_and_sti_fix_for_rails_2.3-2.diff