|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Stop making mediocre tutorials.The best tutorials are video! Camtasia Studio makes it easy to create engaging, buzz-building screen videos at any size, in any popular format. Download the free trial!
|
|
#1
|
|||
|
|||
|
Holding selection in select_tag
I'm new to rails and I haven't seen much decent documentation on using the select_tag helper.
I'm having 2 problems: Holding the selected item in the select box after the form is submitted and also keeping the order of the select items consistent. Here's the code I'm trying: Code:
<%=select_tag('public_all_categories', options_for_select({ :Public => 1, '--Choose--' => '', :Private => 0})) %>
Thanks for your help |
|
#2
|
|||
|
|||
|
Thanks for your help. I solved the problem w/ this little bit:
<%= select_tag('public_all_categories', options_for_select({ :Public => 1, '--Choose--' => '', :Private => 0}, params[ublic_all_categories])) %> Problem solved!!! |
![]() |
| Viewing: Dev Shed Forums > Programming Languages > Ruby Programming > Holding selection in select_tag |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|