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