Let me give you a more full example of what changes after the upgrade.  I fully acknowledge this is a hackish way to keep a pretty URL. Whether this is the Best Way doesn't really matter. What should matter is that this breaks applications.

Routing in question:

map.connect ':controller/:page_number',
              :requirements => { :page_number => (/^[0-9]+$/) }

We start on a page with the url
{"action"=>"index", "id"=>"21", "controller"=>"video"}
or
/video/index/21

Then, during the rendering of this page, url_for is called as...

url_for(:page_number => 3)

As of revision 4340ish, this would translate into (good thing in my application!)

"/video/3"

As of the current revision, this translates into

"/video/3?id=21"

Certainly I can re-code things to work with the new revision, but if backwards compatibility is important then this shouldn't happen.

-hampton.

On 6/1/06, Abdur-Rahman Advany <[EMAIL PROTECTED]> wrote:
You need to set the id or action to nil, unless you change the
controller to something else than video it will include all the params...

try redirect_to(:controller => "video", :action ="" nil)

-- Abdul

Hampton wrote:
> I have an application that broke.
>
> This may be an unwanted behaviour, or not, but I was working with this
> as a feature for using some crazy-routing for pretty urls.
>
> url = "" {"action"=>"index", "id"=>"21",
> "controller"=>"video"}
>
> then, I would do this.
>
> redirect_to(:controller => "video")
>
> The url it redirects to is...
>
> "video/index/21"
>
> While, I would expect (and the previous behaviour was)..
>
> "video"
>
> Am I crazy?
>
> -hampton.
>
> That means its understanding the deletion of the :do directive, but is
> keeping the :id and :action around.
>
> On 6/1/06, *Jamis Buck* <[EMAIL PROTECTED]
> <mailto:[EMAIL PROTECTED]>> wrote:
>
>     Just a quick update--the routing rewrite has been checked in. We've
>     already noticed a few things broken and have patching them this
>     morning, but we'd love to hear from those of you willing to test
>     their apps with the bleeding edge.
>
>     Thanks!
>
>     - Jamis
>     _______________________________________________
>     Rails-core mailing list
>     [email protected]
>     <mailto:[email protected]>
>     http://lists.rubyonrails.org/mailman/listinfo/rails-core
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> Rails-core mailing list
> [email protected]
> http://lists.rubyonrails.org/mailman/listinfo/rails-core
>

_______________________________________________
Rails-core mailing list
[email protected]
http://lists.rubyonrails.org/mailman/listinfo/rails-core

_______________________________________________
Rails-core mailing list
[email protected]
http://lists.rubyonrails.org/mailman/listinfo/rails-core

Reply via email to