Hello everyone, there was a question of splitting the application into logical parts, i.e. at least backend, frontend. How I imagine the structure of the application:
-app -backend -controllers -models -helpers -assets -views -frontend -controllers -models -helpers -assets -views -common -controllers -models -helpers -assets -views At the moment I don’t know if it is possible to implement it in the rails, googling hasn’t helped yet, but I think that such a structure would be much better than creating a type separation in one application
-controllers -frontend/ -backend/ -common/ In application.rb, the config root property is there, but this is the root of the entire project, i.e. after reassigning it for example app / backend, the rails start looking for all the files that are in / applications in the app / backend (which is logical in principle).
In general, ideally, I rely on the subdomain to remap the path to the app app, something like this:
config.path_to_app = case request.subdomain when 'admin' then 'app/backend' when 'api' then 'app/api' else 'app/frontend' end Please help me figure out whether it is possible to break the application in this way, or at least advise best practice.