Question: What is the correct way to generate a ProductsController with an index action using only the command-line tools bundled with Rails?

  1. `rails generate controller --options {name: "Products", actions: "index"}`
  2. `rails generate controller --name Products --action index`
  3. `rails generate controller Products index`
  4. `rails generate ProductsController --actions index`

Answer: The correct answer of the above question is Option C:`rails generate controller Products index`