[Radiant] Virtual Domain extension for mental
Adam Williams
adam at thewilliams.ws
Fri Dec 15 09:47:51 CST 2006
On Dec 15, 2006, at 9:55 AM, Brian Gernhardt wrote:
>
> As far as I can tell from mucking with the code, I get the error any
> time I call any method on @page.children, where @page is a
> VirtualDomainPage.
It's interesting to me that in VirtualDomainPageTest#setup, a Page
instance is created, it's class_name set to VirtualDomainPage, and
then it is reloaded as a VirtualDomainPage instance. Immediately
afterward, @page.children.create is invoked, which doesn't blow up.
Looking closer, I found that the 'Anonymous module' that has 'no name
to be referenced by' is NoCachePage, defined in the PageTestHelper.
The stack and ruby-debug output is below. I confess that I don't know
enough at the moment about all the interactions of your tests with
the PageTestHelper, but this might help someone else, or you, figure
out wazzup.
------
#5 /Users/aiwilliams/Documents/workspace/radiantextensions/test/../
config/../vendor/rails/activerecord/lib/active_record/base.rb:1066:in
`instantiate_without_callbacks'
(rdb:1) l=
[1061, 1070] in /Users/aiwilliams/Documents/workspace/
radiantextensions/test/../config/../vendor/rails/activerecord/lib/
active_record/base.rb
1061 unless columns_hash.include?
(inheritance_column)
1062 allocate
1063
1064 else
1065 begin
=> 1066 compute_type(subclass_name).allocate
1067 rescue NameError
1068 raise SubclassNotFound,
1069 "The single-table inheritance
mechanism failed to locate the subclass: '#{record
[inheritance_column]}'. " +
1070 "This error is raised because the
column '#{inheritance_column}' is reserved for storing the class in
case of inheritance. " +
(rdb:1) p subclass_name
"NoCachePage"
(rdb:1)
--------
HTH,
aiwilliams
More information about the Radiant
mailing list