Forum: Ruby on Rails Single Table Inheritance

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
92324d1a212698587be6a5f349c7a9b4?d=identicon&s=25 Oliver Andrich (oandrich)
on 2006-02-09 16:23
(Received via mailing list)
What am I doing wrong?

I have a simple MySQL table:

drop table if exists agencies;
create table agencies (
  id                    int           not null auto_increment,
  type                  varchar(20)   not null,
  name                  varchar(255)  character set utf8 not null,
  primary key (id)
);

An equally simple Model:

class Agency < ActiveRecord::Base
end

class FotoAgency < Agency
end

Why can't create an instance of FotoAgency in script/console? It seems
as the class hasn't been loaded so far.

Best regards,
Oliver
This topic is locked and can not be replied to.