On 2/7/07, Petr
<rails-mailing-list-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org>
wrote:>
> Ive got this:
>
> @oss = Product.find(:all, :conditions => "part_type =
''Operating
> System''").map {|u| [u.title, u.id]}
>
> select(:system, :os, @oss)
>
> I would like to add an empty space/or custom text in front of the list
> of operating systems. such as:
>
> <option>Select from the list</option>
> <option id="1">Windows XP Professional</option>
> ........
>
> How do i do this?
>
> Thanks,
> Petr
Hi Petr,
How about:
select(:system, :os, @oss, :prompt => ''Select from the
list'')
?
George.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Talk" group.
To post to this group, send email to
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---