title: Run Generate Controller command from a Module
body: <p>I know the basic command to create controllers in Rails is to use Rails generate controller </p>
  
  <p>But in the code I see something like this structure below and was wondering how to do that?</p>
  
  <p>The structure looks like this:</p>
  
  <p><img src="https://i.stack.imgur.com/enc9N.png" alt="enter image description here"></p>
  
  <p>and the generated code looks like this, I need something similar:</p>
  
  <pre><code>module Performance
    class BaseController &lt; ApplicationController
    end
  end
  
  
  module Performance
    class GroupsController &lt; BaseController
      def show
      end
  
      def index
      end
    end
  end
  </code></pre>