I have the following class hierarchy for my models:
Document < ActiveRecord::Base
|
|-- Photo < Document
|
\-- Video < Document
I then have a table in mySQL called documents with the following basic
structure:
CREATE TABLE `documents` (
`id` int(10) unsigned NOT NULL auto_increment,
`name` varchar(255) NOT NULL default '''',
`type` varchar(20) NOT NULL default '''',
PRIMARY KEY (`id`)
) ;
All the unit tests for Document are working fine, but when I run any
tests for the child classes (Video for example) I get an error saying
the table ''videos'' cannot be found.
It looks like it''s not detecting that Video is a child of Document and
should use the documents table. Is there anything else I have to do to
let it know of this?
I''m running rails version 0.12.1.1607
Thanks in advance.
--
R.Livsey
http://livsey.org