Acts_as_tree, polymorphism and class loading problems

I have a tree (acts_as_tree) with nodes where each node is instances of
different subclasses of Node. Each Node subclass knows how to point to
another table/instance in order to accomplish extension by composition.
This works good most of the time where I either loops over just the
nodes without accessing the “external” data (the instance pointed to by
Node subclass) or just accesses the external data straight away.

But I do get problems when I try to access the external data through the
nodes when traversing the tree? I get the following (in different areas
of the error screen):

Error description:

uninitialized constant SectionFolder


const_missing' (eval):3:indata’
#{RAILS_ROOT}/app/helpers/pages_helper.rb:33:in `map’

“Another” description:

This error occured while loading the following files:

SectionFolder in this case is a class that a Node subclass points to
(SectionFolderNode actually).

Any way around this apart from having to do a require for every possible
class in some controller (or in environment.rb)? Loop over the files in
/app/model and require them?