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):
uninitialized constant SectionFolder
This error occured while loading the following files:
SectionFolder in this case is a class that a Node subclass points to
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?