# List all available nested resources routes?

**URL:** <https://www.ruby-forum.com/t/list-all-available-nested-resources-routes/105255>\
**Category:** Rails\
**Created:** [May 28, 2007, 5:56am UTC](https://www.ruby-forum.com/t/list-all-available-nested-resources-routes/105255 "2007-05-28T05:56:28Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Dion\_H](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/839c29/32.png) [@Dion\_H](https://www.ruby-forum.com/u/Dion_H)\
**Post date:** [May 28, 2007, 5:56am UTC](https://www.ruby-forum.com/t/list-all-available-nested-resources-routes/105255/1 "2007-05-28T05:56:28Z")

</div>

hi there,

how do you list all the possible named routes for your nested resources

is there a way to do this from console???

cheers

dion

---

<div class="post-metadata">

**Author:** ![Dion\_H](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/839c29/32.png) [@Dion\_H](https://www.ruby-forum.com/u/Dion_H)\
**Post date:** [May 28, 2007, 6:01am UTC](https://www.ruby-forum.com/t/list-all-available-nested-resources-routes/105255/2 "2007-05-28T06:01:28Z")

</div>

just found the Routing Navigator plugin

[http://blog.caboo.se/articles/2006/06/19/new-plugin-routing-navigator](http://blog.caboo.se/articles/2006/06/19/new-plugin-routing-navigator)

this sounds promising…

---

<div class="post-metadata">

**Author:** ![Dion\_H](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/839c29/32.png) [@Dion\_H](https://www.ruby-forum.com/u/Dion_H)\
**Post date:** [May 28, 2007, 8:11am UTC](https://www.ruby-forum.com/t/list-all-available-nested-resources-routes/105255/3 "2007-05-28T08:11:34Z")

</div>

On May 27, 2007, at 11:00 PM, Dion H. wrote:

> just found the Routing Navigator plugin
> 
> [Parked at Loopia](http://blog.caboo.se/articles/2006/06/19/new-plugin-routing-navigator)
> 
> this sounds promising…

I find the routing plugin to be extremely helpful.  
If you still want to find them from the console, keep in mind that  
methods for the routes get attached to your controller.

This allows you to do this:

$ ./script/console

> > a = ApplicationController.new  
> > a.methods.sort.select {|m| m =~ /url$/ }

You can play with the regexp in the select block to filter to exactly  
what you’re looking for, but trying it should be illustrative.

Thanks,

David

---

<div class="post-metadata">

**Author:** ![Dion\_H](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/839c29/32.png) [@Dion\_H](https://www.ruby-forum.com/u/Dion_H)\
**Post date:** [May 28, 2007, 1:45pm UTC](https://www.ruby-forum.com/t/list-all-available-nested-resources-routes/105255/4 "2007-05-28T13:45:10Z")

</div>

hey David

thats pretty hand

a.methods.sort.select {|m| m =~ /path$/ }

never thought of parsing regexps through console output

cheers
