Multiple choice technology web technology

Which of the following is valid rails syntax for scaffolding?

  1. ruby script/generate scaffold recipe [name,type] => [string,string]

  2. ruby scaffold recipe [name,type] => [string,string]

  3. ruby script/generate scaffold recipe name=string type=string

  4. ruby script/generate scaffold recipe name:string type:string

Reveal answer Fill a bubble to check yourself
D Correct answer
Explanation

In Rails (especially older versions with script/generate), scaffolding syntax uses field:type pairs separated by spaces. Option D correctly shows name:string type:string, which specifies two fields with their data types. The other options use incorrect syntax like arrows, equals signs, or malformed type declarations.