I have Html tag <select>: <select name=''tag''> <OPTION value =''smth1'' > smth1 <OPTION value =''smth2'' > smth2 </select> and my question is: how to obtain selected value by using ruby or rails? -- Posted via http://www.ruby-forum.com/.
I''m assuming you mean in a Controller: value = @params[''tag''] value will contain the value string, not the display string. Jason Valen wrote:> I have Html tag <select>: > > <select name=''tag''> > <OPTION value =''smth1'' > smth1 > <OPTION value =''smth2'' > smth2 > </select> > > and my question is: how to obtain selected value by using ruby or rails? > >
No, I assume, that I have rhtml file with this tag and want to get selected value to use it in same rhtml file without using Controller (DOM model) Jason Roelofs wrote:> I''m assuming you mean in a Controller: > > value = @params[''tag''] > > value will contain the value string, not the display string. > > Jason-- Posted via http://www.ruby-forum.com/.