- Online Exam Test Papers | - MCQs[multiple choice questions and answers ] | - Mock Test Papers | - Practice Papers | - Sample Test Papers |

Question:
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) %>

Posted Date:-2022-09-17 03:39:25


More MCQS Questions and answers

Search