drop down not keeping value after errors are shown

Jimmy Palmer
2008-03-03T22:50:49Z

My drop down gets reset to the first value when the form gets returned
with errors.

here is my code:

<%= f.select :card_type,  [
  [''Choose a Payment Type'', nil],
  [''Visa'', ''Visa''],
  [''MasterCard'', ''master''],
  [''American Express'', ''American Express'']]
%>

For example, say the user selects "Visa" and doesn''t fill out
the rest
of the form correctly.  The user submits the form and errors are shown.
For some reason this drop down does not keep the "Visa" value and goes
back to the "Choose a Payment Type".

How can i keep the value in the drop down after errors are shown?
--
Posted via http://www.ruby-forum.com/.