# Nested restful resources without controller name in the url

**URL:** <https://www.ruby-forum.com/t/nested-restful-resources-without-controller-name-in-the-url/90669>\
**Category:** Rails\
**Created:** [March 30, 2007, 8:54pm UTC](https://www.ruby-forum.com/t/nested-restful-resources-without-controller-name-in-the-url/90669 "2007-03-30T20:54:39Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![panto](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/f9ae1b/32.png) [@panto](https://www.ruby-forum.com/u/panto)\
**Post date:** [March 30, 2007, 8:54pm UTC](https://www.ruby-forum.com/t/nested-restful-resources-without-controller-name-in-the-url/90669/1 "2007-03-30T20:54:39Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![panto](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/f9ae1b/32.png) [@panto](https://www.ruby-forum.com/u/panto)\
**Post date:** [March 30, 2007, 9:41pm UTC](https://www.ruby-forum.com/t/nested-restful-resources-without-controller-name-in-the-url/90669/2 "2007-03-30T21:41:48Z")

</div>

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](http://weblog.jamisbuck.org/2007/2/5/nesting-resources)

- BD
