Challenge 3: Generate a Controller — Solution Command: $ rails generate controller Products index show Expected output / files created: create app/controllers/products_controller.rb create app/views/products/index.html.erb create app/views/products/show.html.erb route get "products/index" route get "products/show" =begin Notes: - The controller file name follows Rails' naming convention exactly like the chapter's Welcome example: ProductsController becomes products_controller.rb (snake_case, pluralized to match the resource name), placed automatically in app/controllers/. - Two view files are created, one per action listed in the command (index and show), each following the pattern app/views//.html.erb. - Two route entries are added to config/routes.rb automatically, one per action — this is a simple, unopinionated route per action, distinct from the more idiomatic resources :products approach the next chapter covers, which would generate a full set of RESTful routes instead of one route per explicitly-listed action. - No model, migration, or database table is created by this command at all — rails generate controller only touches the controller and view layers, not Active Record. =end