search for: on_for

Displaying 1 result from an estimated 1 matches for "on_for".

Did you mean: n_for
2006 Jul 31
3
Polymorphic associations and single table inheritance
...=> :addressable, :dependent => :destroy end class Member < Person end Adding an Address to a Member results in the addressable_type column equaling "Person" when it should be "Member". Looking in ActiveRecord::Associations::AssociationProxy#set_belongs_to_association_for and ActiveRecord::Associations:: HasManyAssociation#construct_sql it''s clear why. >From ActiveRecord::Associations::AssociationProxy#set_belongs_to_association_for: record["#{@reflection.options[:as]}_type"] = @owner.class.base_class.name.to_s Removing the call to base_c...