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.
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To view this discussion on the web visit https://groups.google.com/d/msg/rubyonrails-talk/-/Yg92uN5u7OIJ.
To post to this group, send email to firstname.lastname@example.org.
To unsubscribe from this group, send email to email@example.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.