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 . --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
IS this the RAILS''s bug? 2007/9/7, aotianlong <aotianlong-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>:> > > 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 . > > > > >--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
The way rails does it is the correct way. It will be reconstructed as an array in the params hash. On Sep 7, 7:49 am, aotianlong <aotianl...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> 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 .--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
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, On 9/7/07, ao tianlong <aotianlong-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> IS this the RAILS''s bug? > > > 2007/9/7, aotianlong <aotianlong-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>: > > > > 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 . > > > > > > > > > > >-- Cheers! - Pratik http://m.onkey.org --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---