padrino-framework icon indicating copy to clipboard operation
padrino-framework copied to clipboard

[feature] [gen] name sub-app classes Foo::Bar::App

Open postmodern opened this issue 5 years ago • 0 comments

In order to keep module namespaces, I think it would be useful to name the sub-app class ProjectName::AppName::App, where ProjectName is the module name for the whole project and AppName is the module name for the sub-app. This would make it easier to nest models or additional lib code in the sub-app namespace.

Example

$ padrino-gen project foo
$ cd foo/
$ padrino-gen app bar

Would produce a bar/app.rb file beginning with:

module Foo
  module Bar
    class App < Padrino::Application

postmodern avatar Nov 10 '18 04:11 postmodern