currently im displaying a list using this:
<p><%= f.select :depGroupname, options_for_select(@dep_group_name) %></p>
I need it in such a way that, the user must be able to either add an item to the drop down for example id drop contains ‘1’, ‘2’ and ‘3’ then he can either type in ‘4’ in the drop down or can select and one of those 3 in the drop down and then click on submit.
Currently im using the value selected in the drop down as
param[:form][:depGroupname] in the controller. How can approach to implement this functionality?, do i need to change the way i access the added content in the controller?
i have already seen this link but i was not able to figure out the solution from those suggestions.
Please help
Thanks
check this answer, i would personally take that to javascript land instead of playing with rails helpers.
Can a dropdown menu be editable?