[Nitro] Is there a reason I shouldn't want to do this?

nyarly at gmail.com nyarly at gmail.com
Thu Feb 8 19:40:19 EST 2007

class Target
  attr_accessor :thing, String
  def initialize(t); thing=t; end

class SubTarget < Target
  attr_accessor :another_thing, String
  def initialize(t, a_t); super(t); another_thing = a_t; end

class Owner
  has_many :targets, Target

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?

More information about the Nitro-general mailing list