Question: How would you generate a drop-down menu that allows the user to select from a collection of product names?
- `<%= select_tag(@products) %>`
- `<%= collection_select(@products) %>`
- ``
- `<%= collection_select(:product, :product_id, Product.all, :id, :name) %>`
Answer: The correct answer of the above question is Option D:`<%= collection_select(:product, :product_id, Product.all, :id, :name) %>`