Hello,
What is the better way to organize database in case of inheritance
models ?
If I have 2 classes :
class Person < ActiveRecord::Base
attr :name, :adress
end
class Teacher < Person
attr :school
end
I''ll have à table people with fields name, adress and school.
Is there the better way ?
A person could have thousands of inherited models, do all their
attributes have to be in the table ''people'' ?
ps : sorry for my bad english. I hope I have a good usage of the word
inheritance... :-p
--~--~---------~--~----~------------~-------~--~----~
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
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---