Forum: Ruby on Rails Has_one and Class Table Inheritance

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
Nuno (Guest)
on 2006-03-31 17:13
Hello, is there something wrong with using has_one to implement Class
Table Inheritance ?


class Person < ActiveRecord::Base
   # attributes : eg. name, string

class Contact < Person
   # attributes :
   has_one :Person
   belongs_to :Company

Of course for a such simple case I could use Single Table Inheritance
but this is only an example and I don't like too much the fact of mixing
in a single table a bunch of inrelated and unused properties.

Your advice is welcome, thanks
This topic is locked and can not be replied to.