Antonio Pardo
2007-Mar-30 18:53 UTC
nested restful resources without controller name in the url
hi, first, sorry for my english. i have this resources in routes.rb: map.resources :artists, :path_prefix => ''/music'' do |artists| artists.resources :albums do |albums| albums.resources :tracks end end with this i have this type of url''s: /music/artists/the+pixies/albums/doolitle/tracks/debaser my question is if it''s possible to hide the controller name in the url somehow to have url''s of type: /music/the+pixies/doolittle/debaser if this possible?, breaks somehow the rest philoshopy? thanks -- http://debaser.homelinux.com/
brian.dainton
2007-Mar-30 19:40 UTC
Re: nested restful resources without controller name in the url
Hi Antonio, I don''t have an answer for exactly how to construct the routes w/out the controller names (sorry), but I read this post on Jamis'' blog recently and thought it might be relevant for you: http://weblog.jamisbuck.org/2007/2/5/nesting-resources - BD On Mar 30, 12:53 pm, Antonio Pardo <antonio.pa...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> hi, > > first, sorry for my english. > > i have this resources in routes.rb: > > map.resources :artists, :path_prefix => ''/music'' do |artists| > artists.resources :albums do |albums| > albums.resources :tracks > end > end > > with this i have this type of url''s: > /music/artists/the+pixies/albums/doolitle/tracks/debaser > > my question is if it''s possible to hide the controller name in the url somehow > to have url''s of type: > /music/the+pixies/doolittle/debaser > > if this possible?, breaks somehow the rest philoshopy? > > thanks > > --http://debaser.homelinux.com/ > > application_pgp-signature_part > 1KDownload--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---