-
Type: Task
-
Resolution: Done
-
Affects Version/s: None
-
Component/s: None
We have some of our models in subdirectories, purely to make file organisation cleaner. The models are not namespaced. E.g.
class Follow end class Unfollow end app/models/notifications/follow.rb app/models/notifications/unfollow.rb
The code in Rails::Mongoid#determine_model assumes anything in a subdirectory is namespaced, and therefore doesn't work with the above structure (it thinks the classes would be Notifications::Follow and Notifications::Unfollow.
I really hate digging around in this sort of thing (autoloading of files). Does anyone know of a quick solution?