# Nested routes without id

**URL:** <https://www.ruby-forum.com/t/nested-routes-without-id/166738>\
**Category:** Rails\
**Created:** [April 29, 2009, 3:11am UTC](https://www.ruby-forum.com/t/nested-routes-without-id/166738 "2009-04-29T03:11:06Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![shardul](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/f475e1/32.png) [@shardul](https://www.ruby-forum.com/u/shardul)\
**Post date:** [April 29, 2009, 3:11am UTC](https://www.ruby-forum.com/t/nested-routes-without-id/166738/1 "2009-04-29T03:11:06Z")

</div>

hi there,

I am trying to create nested routes

i have controller explores without model. (i.e this controller dont  
have model)  
And then there are other two.  
so i am trying to create routes like this .

map.resources :explores do |explore|  
explore.resources :categories do |category|  
category.resources :hobbies  
end  
end

but this creating routes for explore\_category\_hobbies\_path

/explores/explore\_id/category/category\_id/hobbies etc.

I dont want explore\_id into routes

i want it to create the path like this  
/explores/category/category\_id/hobbies

Can anyone help me.

---

<div class="post-metadata">

**Author:** ![shardul](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/f475e1/32.png) [@shardul](https://www.ruby-forum.com/u/shardul)\
**Post date:** [April 29, 2009, 4:27am UTC](https://www.ruby-forum.com/t/nested-routes-without-id/166738/2 "2009-04-29T04:27:16Z")

</div>

try  
map.resource :explore  
i think leaving the “s” off resources will do what you want

On Apr 28, 9:11 pm, Shardul M. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)
