Hi
I have an array of string and I want to use it in collection_select
rails function…
[‘cassiano’, ‘roloff’]
to use in…
<%= collection_select ‘form’, ‘field’, @my_array? %>
Thanks for help
Hi
I have an array of string and I want to use it in collection_select
rails function…
[‘cassiano’, ‘roloff’]
to use in…
<%= collection_select ‘form’, ‘field’, @my_array? %>
Thanks for help
Cassiano,
<%= select_tag “field”, options_for_select(@my_array, @my_array[0]) %>
~~~~~~~~~~~~
Reinhart Ariando
YM: Booking2Heaven
WEB: teapoci.blogspot.com
~~~~~~~~~~~~
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.
Sponsor our Newsletter | Privacy Policy | Terms of Service | Remote Ruby Jobs