how to add a new value to a dropdown list in Rails
- by LearnRails
In my item table, I have a itemname column which is currently a dropdown list taking values from DB.
<%= select 'item','itemname' ,
Item.find(:all).collect{|c| [c.itemname]},{:include_blank = 'Select Name'}
How can I add a new value to this dropdown list through the application. Is there a provision to directly add value to the list?
Thanks