Forum: Ruby on Rails url_for and arrays parameters (diff between 1.1.6 and 1.2.2)

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
Andrew (Guest)
on 2007-03-03 05:24

I apologize in advance if this has been brought up before, but I tried
searching the previous convos for this and didn't come up with anything.
I'm wondering if I'm experiencing a bug or expected behavior in the new
release of rails.

In Rails 1.2.2

I'm passing an array to url_for like so...
url_for :controller => 'test', :action => 'list', :fields => %w(a b c d)

and that generates...

and when I look at my params object in my action fields contains a
string that looks like "a/b/c/d".  Not much of an array there (although
I can split it on the /).

When using Rails 1.1.6, the same url_for call generates...

and the params object in my action contains an array like I would

I'm certain the new routing engine is causing the difference, but is
this a bug?  Can somebody please explain why I'm experiencing the
results I am?

This topic is locked and can not be replied to.