问题
I know the basic command to create controllers in Rails is to use Rails generate controller
But in the code I see something like this structure below and was wondering how to do that?
The structure looks like this:

and the generated code looks like this, I need something similar:
module Performance
class BaseController < ApplicationController
end
end
module Performance
class GroupsController < BaseController
def show
end
def index
end
end
end
回答1:
To generate namespaced controller you should type, for example:
rails g controller performance/base
来源:https://stackoverflow.com/questions/17153286/run-generate-controller-command-from-a-module