Challenge 2: Convert Express Routes to Rails — Solution # config/routes.rb Rails.application.routes.draw do resources :products, only: [:index, :show, :create] end =begin Notes: - The Express setup only defined three routes: listing all products (GET /products), viewing one product (GET /products/:id), and creating a new one (POST /products) — no update or delete routes exist at all. - only: [:index, :show, :create] tells Rails to generate exactly those three routes and none of the other four (new, edit, update, destroy), matching the reduced Express setup precisely rather than generating all seven and simply leaving four of them unused. - This is the right tool specifically because the missing routes aren't an oversight to fix — they reflect an intentionally smaller API surface, which only: expresses directly in the routes file itself rather than leaving four dead routes pointing at controller actions that were never written. =end