This project is archived and is in readonly mode.
STI sub classes not loaded until parent is
-
Frederick Cheung
Works fine for me. Where have you put these classes?
-
Ian Ownbey
ooooo all the STI are in the same file as the model. This could be creating the problem.
-
Frederick Cheung
That will definitely be a problem. If they are both in container.rb, how can the dependencies mechanism know that if you hit const_missing for Doc you need to look in container.rb?
-
DHH
- State changed from new to resolved
Auto-loading only works when each class is in its own file. If you want to keep all the files in one, you can always force the load with require_dependency 'container' some where.