class Target
attr_accessor :thing, String
def initialize(t); thing=t; end
end
class SubTarget < Target
attr_accessor :another_thing, String
def initialize(t, a_t); super(t); another_thing = a_t; end
end
class Owner
has_many :targets, Target
end
o = Owner.new
o.add_target(SubTarget.new("one", "two"))
At present, this creates three tables, with a foreign key from
og_target to og_owner, and the SubTarget gets lost because the select
is against the og_target table.
Is there a philosophy here that I'm not understanding?