Listing 3.4: Generating a StaticPages controller

Rails comes with a script for making controllers called generate; all it
needs to work its magic is the controller’s name. Since we’ll be making
a controller to handle static pages, we’ll call it the StaticPages
controller. We’ll also plan to make actions for a Home page, a Help
page, and an About page. The generate script takes an optional list of
actions, so we’ll include two of the initial actions directly on the
command line (Listing 3.4).

Here we’ve used the option --no-test-framework to suppress the
generation of the default RSpec tests, which we won’t be using. Instead,
we’ll create the tests by hand starting in Section 3.2. We’ve also
intentionally left off the about action from the command line arguments
in Listing 3.4 so that we can see how to add it using test-driven
development, or TDD (Section 3.2).