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 [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
-~----------~----~----~----~------~----~------~--~---