Do you have any idea why the name (="language") here is not being honored? I expect it to be in the search query.. but instead it spits out somethin开发者_运维百科g ugly like "company%5Blanguage%=".
<%=select( :company,:language,{'Italian' => 'Italian', 'English' => 'English','Italian and English' => 'Italian and English'},{:name => "language", :prompt=>true} )
I have tried to take it out of the brackets by the way.. no luck.
Thanks!
Ah interesting. In case this will help someone, here is my solution
select( :company,:language,{'Italian' => 'Italian',..},
{:name => "language", :prompt=>true},{:name =>
"language"}
The reason is that the form of the select tag is
select(object, method, choices, options = {}, html_options = {})
and you need to make sure the :name is set in html_options.
Thanks!
精彩评论