Yup, then like Marnen said, Person should belong to Item:

  belongs_to :item, :polymorphic => true

In your migration, you can use:

  t.references :item, :polymorphic => true

Which will create item_type and item_id columns.

Then each class A, B, and C can have one person:

  has_one :person, :as => :item

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to