Forum: Ruby CGI question

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
JoeyP (Guest)
on 2007-04-03 16:56
(Received via mailing list)
Hello,
I am using the CGI class to create a web page.
I need a drop down list. I have a formatted string in a DB table for
the values.
How can I access the variable?

           cgi.option('value'=>'pathway') { "KEGG/PATHWAY" } +
            cgi.option('value'=>'brite') { "KEGG/BRITE" } +
            cgi.option('value'=>'genes') { "KEGG/GENES" } +


I'm trying this:

cgi.option( myformattedstring) { " some text"}+


The problem is that I cannot use 'myformattedstring' variable.

I declare it like this:
 myformattedstring << " \'value\'=>\'red\' "

Any thoughts on how I can get this working?

Thanks in advance
This topic is locked and can not be replied to.