Hi guys,
In my "fooengine" mountable engine, I have subfolders within the app/ models/fooengine folder. For example: app/models/fooengine/core_models/foo.rb
In order to have these files loaded, I added: config.autoload_paths += %W(#{config.root}/app/models/fooengine/ core_models) to lib/fooengine/engine.rb.
But it gives an error: LoadError: Expected ... to define Foo and indeed, the fully qualified name is FooengineFoo, not Foo so the auto loader is lost.
It works if I rename all my model files to fooengine_(model name).rb, but I guess there probably is a better way.
Do you know?
Thanks a lot! PJ