List Menu

In ruby, can i change the “text_field” to “list menu”? For example like
below…

*Gender :
<%= text_field 'registration', 'gender' %>

Sure. For this simple example you would use the select method.
Instead of <%= text_field ‘registration’, ‘gender’ %>, you’d use:

<%= select ‘registration’, ‘gender’, {“Male” => “Male”, “Female” =>
“Female”}, { :include_blank => true } %>

Check the documentation for more
details.

Marc

On Mar 19, 2:46 am, Hasana H. [email protected]

Thank you very much…it works.