ao_tianlong
(ao tianlong)
September 7, 2007, 12:49pm
#1
hi , every one.
i just want to generate url from url_for method
like this:
url_for(:controller=>"users",:action=>"index",:names=>["aotianlong","ayowaya"])
i except it's generate
users?names[]=aotianlong&names[]=ayowaya
but it's generated :
users?names=aotianlong%2Fayowaya
any idiea ?
thank you .
IS this the RAILS’s bug?
The way rails does it is the correct way. It will be reconstructed as
an array in the params hash.
Pratik1
(Pratik)
September 7, 2007, 3:43pm
#4
Looks like it. However, did you try in edge rails ? url_for()
generates expected link in edge for me. That'd be
"users?names[]=aotianlong&names[]=ayowaya" in your case,