I\'m currently working on a Rails 3 application that looks like it might need to use Class Table Inheritance for a couple of models.
A simplified example of what\'s goin
Also there is a plugin 'acts_as_relation' to do this,
https://github.com/hzamani/acts_as_relation/
in your case the code will be this:
class Driver < ActiveRecord::Base
acts_as :person
end
class Passenger < ActiveRecord::Base
acts_as :person
end
Don't forget to add person_type
and person_id
columns to persons
table.
Now both Drive and Passenger inherit Person attributes, validations and methods.