Hello everyone,
I''m starting learning ruby on rails and i have a question that maybe is
more
about ruby but anyway.
I have a table with 2 columns type and value and i would like to create a
select that had like options all the values but for certain types they
should appear as the text.
I want to achieve something like:
Select the option: <select id="condition"
name="condition">
<option value="private">private</option>
<option value="public">public</option>
<option value="tkk">Group tkk</option>
<option value="tkk">Group Rails</option>
<option value="tkk">Group The great school</option>
<option value="testi1">User testi1</option></select>
<option value="testi1">User testi2</option></select>
<option value="testi1">User testi3</option></select>
In my example i would like that all the lines that is related to users or
groups has the type in the select text.
Can i use select or should be select_tag and also how can i create this
default options if they come from the database and i have to do some
"coding" before put into the select?
Any tips will be appreciated.
Thank you!
--
Marcos Müller Lopes Fonseca
Arquiteto da Informação - MAV Tecnologia
Gerente de projetos - UFMG Informática Jr.
Sistemas de Informação - UFMG
marcoscefet-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org / 87553132
--~--~---------~--~----~------------~-------~--~----~
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@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---