I’m working on a module based application.
The first module is an eCommerce module.
I’ve made a few models for the webshop with the namespace Webshop:
My backend application has the namespace Admin::ModuleName::Controller.
Now if I call one of the webshop models from my catalog controller
(Admin::Webshop::CatalogController) i get the following error:
uninitialized constant Admin::Webshop::CatalogController::Webshop
I’ve tried to call the model on various ways like Category.find and
Webshop::Category.find both giving me the same error.
If I rename the model to Admin::Webshop::Category everything works fine
but this is not what I want because I have to call the models from the
front-end site too.
Thanks in advance