KathysKode-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
2007-Nov-16 14:01 UTC
How will Rails 2.0 build prefix''s into nexted paths?
I''ve recently observed a reply by David Black ( http://groups.google.com/group/rubyonrails-talk/browse_thread/thread/fea4376838ac9396?hl=en ) where he described that a routing statement like this; map.resources :projects do |p| p.resources :iterations, :name_prefix => "projects_" end map.resources :iterations in Rails 2.0 will automatically put in the :name_prefix => "projects". As I am going to have to rewrite all routes in a HUGE Rails application to get ready for 2.0 I''d like to know FOR SURE will this ''automatic'' prefix be singular or plural? Thank you, Kathy --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
David A. Black
2007-Nov-16 14:40 UTC
Re: How will Rails 2.0 build prefix''s into nexted paths?
Hi -- On Fri, 16 Nov 2007, KathysKode-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org wrote:> > I''ve recently observed a reply by David Black ( > http://groups.google.com/group/rubyonrails-talk/browse_thread/thread/fea4376838ac9396?hl=en > ) where he described that a routing statement like this; > > map.resources :projects do |p| > p.resources :iterations, :name_prefix => "projects_" > end > map.resources :iterations > > in Rails 2.0 will automatically put in the :name_prefix => "projects". > As I am going to have to rewrite all routes in a HUGE Rails > application to get ready for 2.0 I''d like to know FOR SURE will this > ''automatic'' prefix be singular or plural?Singular. But you can''t sue me :-) (See my answer in the other thread.) David -- Upcoming training by David A. Black/Ruby Power and Light, LLC: * Advancing With Rails, Berlin, Germany, November 19-22 * Intro to Rails, London, UK, December 3-6 (by Skills Matter) See http://www.rubypal.com for details! --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---