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 >> ruby-rails
ruby-rails
[Rails] Which select?
by David Watts other posts by this author
Aug 13 2007 4:25PM messages near this date
[Rails] First JRuby App on GlassFish Screencast & Blog | [Rails] strange safari behavior
Hi All,

I want to create a select list on a form with an array of dates from  
a DB similar to this.
The date is used to search another DB for documents to edit.
<select id="pubdate" name="pubdate"> 
<option value="2007-08-15"> 2007-08-15</option>
<option value="2007-08-22"> 2007-08-22</option>
</select> 

Which if any of the selects would be best for this and
allow what has been selected to be marked as selected
until the choice is changed.

I have been using but never get the selected item to stick:

<%= select_tag(:pubdate, options_for_select 
(@pubdates, :selected=> @pubdate)) %>

Thanks for any hints/references/etc

--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Privacy Policy | Email Opt-out | Feedback | Syndication
© ActiveState Software Inc. All rights reserved