Dropdown Lists
In the event that I want to make a simple dropdown list in a form in rails, I can use this:
<%= f.label :parking, 'Parking Passes' %> <%= f.select :parking, options_for_select([["No Parking Passes Needed",0],[1,1],[2,2],[3,3]])%>
This will assign the field parking (which should get an integer) the value 0, 1, 2 or 3. The dropdown list will default to “No Parking Passes Needed” and then have other options 1, 2 and 3.