ASPN ActiveState Programmer Network
ActiveState
/ Home / Perl / PHP / Python / Tcl / XSLT /
/ Safari / My ASPN /
Cookbooks | Documentation | Mailing Lists | Modules | News Feeds | Products | User Groups


Recent Messages
List Archives
About the List
List Leaders
Subscription Options

View Subscriptions
Help

View by Topic
ActiveState
.NET Framework
Open Source
Perl
PHP
Python
Tcl
Web Services
XML & XSLT

View by Category
Database
General
SOAP
System Administration
Tools
User Interfaces
Web Programming
XML Programming


MyASPN >> Mail Archive >> rubyonrails-talk
rubyonrails-talk
[Rails] options_for_select and sorting
by Scott Parks other posts by this author
Aug 13 2007 11:57AM messages near this date
[Rails] Windows XP tricks and tips | [Rails] Re: options_for_select and sorting
I have several select options on a form and was planning on using  
options_for_select.

If I use the code below the options do not appear in order on the  
form, I am not really
sure of the order they are appearing since it is not alphabetical  
either.

<%= options_for_select({"Co-ed" =>  "Co-ed", "Men" => "Men", "Women"  
=>  "Women", "Please select student body" => "None"}, "None") %>

Would I be better off to use a traditional HTML <option>  tag and put  
my options in the
order I want them to display?

For the record this is the order they display now on the form with  
the code above:

Men
Please select student body
Co-ed
Women

Thanks!

-Scott


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Ta
lk" group.
To post to this group, send email to rubyonrails-talk@[...].com
To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe@[...].com
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---
Thread:
Scott Parks
Vishnu Gopal

Privacy Policy | Email Opt-out | Feedback | Syndication
© 2004 ActiveState, a division of Sophos All rights reserved