sarah_hutchinson
2006-Oct-27 01:16 UTC
Showing selected item when editing form with select drop-down menu.
I''ve got a drop-down menu in a form that I created like this: <%= select_tag ''employee[role]'', options_for_select( [[''Admin'',''admin''],[''Employee'',''employee'']] ) %> When editing a form, how do I get my drop-down to show the item from the database as selected. Right now, it is just defaulting to the first item in the drop-down list. Thanks for the help. Sarah --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk -~----------~----~----~----~------~----~------~--~---