Hi, How do I relate a table to another when one of the models uses single table inheritance? Will this even work? This is the specific problem I am having: There''s an "Address" model with "ShippingAddress" and "BillingAddress" as subclasses. It looks like this: class Address < ActiveRecord::Base End class ShippingAddress < Address has_one :order End Class BillingAddress < Address End On the Order side: class order < ActiveRecord::Base belongs_to :ShippingAddress??? Or shipping_address?? End SB
Apparently Analagous Threads
- Please Help with single table inheritance relationships
- NilClass passed to partial view
- accepts_nested_attributes_for :reject_if issue
- has_one with Single Table Inheritance - NameError : uninitialized constant
- ActiveRecord - Multiple Address for a single record