As things stand currently, resource routing will broken in existing sites if/when they upgrade to Rails 2.0. I''ve added a patch to ticket 8558[1] that should work with both existing and 2.0 style resource routes, giving deprecation warnings when using route names that won''t work in 2.0. It passes all the tests and I''ve checked it against my own sites and everything appears to check out but I''d appreciate some feedback if it breaks anyone''s existing sites (or some +1s if it doesn''t!) Thanks, ANdrew White [1] http://dev.rubyonrails.org/attachment/ticket/8558/ deprecated_resource_routing.2.diff --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. To post to this group, send email to rubyonrails-core@googlegroups.com To unsubscribe from this group, send email to rubyonrails-core-unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-core?hl=en -~----------~----~----~----~------~----~------~--~---
> As things stand currently, resource routing will broken in existing > sites if/when they upgrade to Rails 2.0. I''ve added a patch to ticket > 8558[1] that should work with both existing and 2.0 style resource > routes, giving deprecation warnings when using route names that won''t > work in 2.0. > > It passes all the tests and I''ve checked it against my own sites and > everything appears to check out but I''d appreciate some feedback if > it breaks anyone''s existing sites (or some +1s if it doesn''t!)Taking a look at this, my questions are: 1) Why are there still some hard coded semicolons in the route creation methods? 2) Shouldn''t the seperator default to ; for 1.2.x and / for 2.x? Apart from that, it''s looking good.> Thanks, > ANdrew White > > [1] http://dev.rubyonrails.org/attachment/ticket/8558/ > deprecated_resource_routing.2.diff > > > >-- Cheers Koz --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. To post to this group, send email to rubyonrails-core@googlegroups.com To unsubscribe from this group, send email to rubyonrails-core-unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-core?hl=en -~----------~----~----~----~------~----~------~--~---
On 1 Oct 2007, at 03:57, Michael Koziarski wrote:> 1) Why are there still some hard coded semicolons in the route > creation methods?The routes with semi-colons in are just the deprecated routes - they should always be a semi-colon as there wasn''t an option before. This addresses bitsweat''s concern over breaking incoming links - even if some switches to 2.0 style routes the 1.2.x routes are still recognized. IMO, they should be permanently redirected to the new links but I thought that bitsweat wouldn''t like that and it''s straightforward to add a filter to do in ApplicationController.> 2) Shouldn''t the seperator default to ; for 1.2.x and / for 2.x?This so that any new links generated are forward compatible with 2.x. Any routes that would''ve had a semi-colon are added by (1) above so defaulting to ; would only add duplicate routes - defaulting to / means that out of the box 1.2.4 and above will recognize both 1.2.3 and 2.0 urls. Andrew White --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. To post to this group, send email to rubyonrails-core@googlegroups.com To unsubscribe from this group, send email to rubyonrails-core-unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-core?hl=en -~----------~----~----~----~------~----~------~--~---
On 10/1/07, Andrew White <andyw@pixeltrix.co.uk> wrote:> > On 1 Oct 2007, at 03:57, Michael Koziarski wrote: > > > 1) Why are there still some hard coded semicolons in the route > > creation methods? > > The routes with semi-colons in are just the deprecated routes - they > should always be a semi-colon as there wasn''t an option before. This > addresses bitsweat''s concern over breaking incoming links - even if > some switches to 2.0 style routes the 1.2.x routes are still > recognized. IMO, they should be permanently redirected to the new > links but I thought that bitsweat wouldn''t like that and it''s > straightforward to add a filter to do in ApplicationController. > > > > 2) Shouldn''t the seperator default to ; for 1.2.x and / for 2.x? > > This so that any new links generated are forward compatible with 2.x. > Any routes that would''ve had a semi-colon are added by (1) above so > defaulting to ; would only add duplicate routes - defaulting to / > means that out of the box 1.2.4 and above will recognize both 1.2.3 > and 2.0 urls.ok, last query, the docs need to be updated to reference the new routes, and remove the reference to semicolons. Apart from that looks good to go! -- Cheers Koz --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. To post to this group, send email to rubyonrails-core@googlegroups.com To unsubscribe from this group, send email to rubyonrails-core-unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-core?hl=en -~----------~----~----~----~------~----~------~--~---
On 1 Oct 2007, at 05:50, Michael Koziarski wrote:> ok, last query, the docs need to be updated to reference the new > routes, and remove the reference to semicolons. Apart from that looks > good to go!Also want me to fix the docs on nested resources to refer to the 2.0 style prefixed named route helpers? Andrew White --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. To post to this group, send email to rubyonrails-core@googlegroups.com To unsubscribe from this group, send email to rubyonrails-core-unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-core?hl=en -~----------~----~----~----~------~----~------~--~---