Ruby On Rails Can I have common namespaces in new rails applications?
Is it possible to create whole rails applications under a common namespace?
Lets assume that my company name is Acme, Inc. and I have the following rails projects: Blog, Store, WebService.
By default, if I do something like rails new blog the generated applications will be like:
module Blog
class Application < Rails::Application
module Store
class Application < Rails::Application
module WebService
class Application < Rails::Application
where every project/application is self contained and there is no implicit reference to the company. Ideally I would like to have all this applications under the company namespace, so we can refer to them as:
AcmeInc::Blog::Application
AcmeInc::Blog::Entities::Article
AcmeInc::Store::Application
AcmeInc::Store::Entities::Product
AcmeInc::Store::Entities::Order
AcmeInc::Store::Entities::Customer
etc...
Is this possible? Recommended?
Using: ruby-2.0.0-p451, rails 3.2.17
Is it possible to create whole rails applications under a common namespace?
Lets assume that my company name is Acme, Inc. and I have the following rails projects: Blog, Store, WebService.
By default, if I do something like rails new blog the generated applications will be like:
module Blog
class Application < Rails::Application
module Store
class Application < Rails::Application
module WebService
class Application < Rails::Application
where every project/application is self contained and there is no implicit reference to the company. Ideally I would like to have all this applications under the company namespace, so we can refer to them as:
AcmeInc::Blog::Application
AcmeInc::Blog::Entities::Article
AcmeInc::Store::Application
AcmeInc::Store::Entities::Product
AcmeInc::Store::Entities::Order
AcmeInc::Store::Entities::Customer
etc...
Is this possible? Recommended?
Using: ruby-2.0.0-p451, rails 3.2.17
Comments
Post a Comment