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:3
Posted Date:-2022-09-17 04:06:03