Forum: Ruby on Rails nested restful resources without controller name in the url

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
57a3642924acdd37d03fbdbe0aef6c65?d=identicon&s=25 Antonio Pardo (Guest)
on 2007-03-30 20:54
(Received via mailing list)
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
9ea9b4ca5025de41f3d491adde9e4b6e?d=identicon&s=25 brian.dainton (Guest)
on 2007-03-30 21:41
(Received via mailing list)
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
This topic is locked and can not be replied to.