How would you generate a drop-down menu that allows the user to select from a collection of product names?
1. <%= select_tag(@products) %>
2. <%= collection_select(@products) %>
3. <%= @products.each do |product| %> <% end %>
4.<%= collection_select(:product, :product_id, Product.all, :id, :name) %>
Answer:4
Posted Date:-2022-09-17 03:39:25