I generated through scaffolding products with name and price. In the products/new’s partial _form.html.erb i made a slight change. Instead of having the user to enter the product. I provide a drop down menu replacing :
<%=f.text_field :name %>
<%= select_tag(:name, options_for_select([‘Peas’,‘Butter’,‘Garlic’])) %>
But when I click on submit the name attribute is nil instead of taking the tag I selected.
Please tell me where am I going wrong.
Thanks & Regards.