options_for_select(@clients.map { |c| [c.name,c.id])
On Jan 4, 2008 6:08 AM, John Smith
<rails-mailing-list-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote:
>
> <b>Client</b><br />
> <%= select_tag ''clients[]'',
> options_for_select(
> [['' '',''1''],
[''aaaa'',''2''],
>
>
[''daemon'',''3''],[''nortel'',''4''],[''telefonica'',''5''],[''local'',''6''],[''otro'',''7'']]
> ),
> { :multiple => true, :size =>4 }
> %>
> </p>
>
>
> Instead of using the [''...'', ''.''] code
I would like to use a method of a
> list of clients that I have.
> --
> Posted via http://www.ruby-forum.com/.
>
> >
>
--
Ryan Bigg
http://www.frozenplague.net
Feel free to add me to MSN and/or GTalk as this email.
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---