0 votes
in Ruby by

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

 a. rails generate controller --options {name: "Products", actions: "index"}

 b. rails generate controller --name Products --action index

 c. rails generate controller Products index

 d. rails generate ProductsController --actions index

1 Answer

0 votes
by

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

Correct answer is :-  rails generate controller Products index

...