I’m having a heck of a time getting Single Table Inheritance to work in
I have the following models and have scaffolded out Person and Contact.
class Person < ActiveRecord::Base
class Client < Person
class Contact < ActiveRecord::Base
class Phone < Contact
In script/console I?ve run:
c = Client.find :first
c.phones.create :contactdata => ?555-555-5555?
and get ?NoMethodError : undefined method ?phones? etc??
I tried moving the relationships in to the client and phone models but
there was an SQL error: ?Unknown column contacts.client_id? because the
contacts table has a person_id column not a client_id column. Any help
This message was sent using IMP, the Internet Messaging Program.