Great! We created a new controller named Pages. How did we do this?
rails generate controller Pages command generated a new controller named Pages. This created a file named app/controllers/pages_controller.rb.
- Inside the new Pages controller, we added a method called
home. Methods in Rails controllers are also referred to as controller actions, so here we added the
home action to the Pages controller.