I’m trying to build a rails solution which will have more that one area for example i have an area for managers another for users and other for admin. Because each of the area has a number of controllers i don’t think is a good idea to have all the controllers in one place because there will be a lot of controllers and it will be harder to mange the code also i want to be able to use some parts of the application like an api. Here is what i have in mind for how the solution should be structured:
/
product_library
users_library
managers
app
config
public
....
users
app
config
public
....
admin
app
config
public
....
shared
app
config
public
....
How can i setup a rails solution to which can allow me to instantiate classes from product_library and user_library and will allow me to use some of the functionality or views from the shared (project or library) ?
If my idea of structuring the solution is bad please let me know , i’m open to suggestion on a better structure. Keep in mind that i need separate parts for product library and user library so it can be used in other projects. Also any documentation on how big rails projects are structured is welcomed.
You want to do it within Rails normal structure but with subfolders under each of the MVC components.
See this answer if you want to separate your models.