Drop down box Ruby Cgi

Hi
i am trying to find out how to create a drop-down list with Ruby cgi
but i am not seeing any article

Can any one please help with this
Fosiul

hey its very simple just like html…
in the html.erb file use below code you can may be get it.

Category:
<%= f.select :category_id, Category.all.collect{|c| [c.name,c.id]} %>

in the category table we have id and name of the categories…

What Scott was probably trying to say is that you need to read a
beginners
Ruby on Rails material (he provided a few links to get you started)
before
asking questions. It’s 101 RoR… it’s not a question that needs
attention
on a forum (because it is documented in the API docs). Unless we
misunderstood you completely and you are really try to accomplish
something
complex, but lacked the words (though that does not seem the case from
your
latest reply).

TLDR: read a free online tutorial course / e-book which are plenty out
there before asking very basic questions.

And the rationale behind that is the following: if one is allowed to ask
and get definite answers to questions how to basically use a well
documented function, then who would forbid me to ask how I’d add two
numbers with ruby…

2012/8/27 Balaraju V. [email protected]

Posted via http://www.ruby-forum.com/.


Pagarbiai,
Gintautas

On Aug 26, 2012, at 11:46 AM, Fosiul A. wrote:

i am trying to find out how to create a drop-down list with Ruby cgi
but i am not seeing any article

Can any one please help with this

http://apidock.com/rails/ActionView/Helpers/FormTagHelper/select_tag

Although given how vague, broad, and generally poor your question was,
I’m afraid that may not actually be what you’re looking for. You may
need to start with some tutorials on Rails:

http://ruby.railstutorial.org/ruby-on-rails-tutorial-book
http://guides.rubyonrails.org/getting_started.html
http://guides.rubyonrails.org/


Scott R.
[email protected]
http://www.elevated-dev.com/
(303) 722-0567 voice