We are currently developing our own CMS engine for ROR 3.2. In this process, several types of classes have arisen that we want to be first-class citizens in our rails application, that is, they must be in the application’s application folder and plugins.
Currently we have the following types:
I created multi-user directories in the application folder to save them:
- application / data _source
- application / data_type
- application / view
Other types will appear later, and I'm a little concerned about the pollution of the application folder with so many directories. Thus, I want to move them to a subdirectory / module that contains all the types defined by cms.
All classes should be inside the MyCms namespace, and the catalog layout should look like this:
- application / my _cms / data_source
- application / my_cms / data_type
- application / my_cms / view
But now I'm having problems with startup, because the default startup for rails will look like this:
- application / data _source / my_cms
- application / data_type / my_cms
- app / view / my_cms
But in this way I would not group all types of objects in one directory.
What I want is a bit like viewing a group of isolated engines. For example, in Devise, all views are grouped in the subdirectory views / dev.
Any idea how this can be achieved without a great user implementation?
source share