I have a dropdown menu of states and i have it auto populating the correct state and showing at the top of the list and removing the state from farther down in the list, but what I would like to have it do is just to go down to that state rather then showing at the top of the list and removing from the correct spot in the list of states.
<label for="state">State</label>
<select class="form-control" id="state" name="state">
<% options = ["Alabama","Alaska","Arizona","Arkansas","California","Colorado",
"Connecticut","Delaware","District Of Columbia",
"Florida","Georgia","Hawaii","Idaho","Illinois",
"Indiana","Iowa","Kansas","Kentucky","Louisiana",
"Maine","Maryland","Massachusetts","Michigan",
"Minnesota","Mississippi","Missouri","Montana",
"Nebraska","Nevada","New Hampshire","New Jersey",
"New Mexico","New York","North Carolina",
"North Dakota","Ohio","Oklahoma", "Oregon",
"Pennsylvania","Rhode Island","South Carolina",
"South Dakota","Tennessee","Texas","Utah","Vermont","Virginia",
"Washington","West Virginia","Wisconsin","Wyoming"]- [customerinfo[0]['state'] ]%>
<option value=<%= customerinfo[0]['state'] %>><%= customerinfo[0]['state'] %></option>
<% options.each do |option| %>
<option value=<%=option%>><%=option%></option>
<% end %>
</select>