# More routing problems

**URL:** <https://www.ruby-forum.com/t/more-routing-problems/174328>\
**Category:** Rails\
**Created:** [August 25, 2009, 3:42am UTC](https://www.ruby-forum.com/t/more-routing-problems/174328 "2009-08-25T03:42:36Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Glen](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/g/8c91f0/32.png) [@Glen](https://www.ruby-forum.com/u/Glen)\
**Post date:** [August 25, 2009, 3:42am UTC](https://www.ruby-forum.com/t/more-routing-problems/174328/1 "2009-08-25T03:42:36Z")

</div>

I have the following route in my routes.rb:

map.resources :start, :member =\> { :about =\> :get }

The first problem is that Rails won’t let me add :only =\>  
[:index, :about]

However the bigger problem is that when following a link in an image  
map I get the following error:

Unknown action

No action responded to show. Actions: about and index

Here is the relevant area tag:

As far as I can tell I should have a route for start/about using GET  
however Rails is convinced I want the show method, which I am unaware  
I was asking for.

---

<div class="post-metadata">

**Author:** ![Glen](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/g/8c91f0/32.png) [@Glen](https://www.ruby-forum.com/u/Glen)\
**Post date:** [August 25, 2009, 4:42am UTC](https://www.ruby-forum.com/t/more-routing-problems/174328/2 "2009-08-25T04:42:53Z")

</div>

Hi Glen,

On Mon, 2009-08-24 at 18:41 -0700, Glen wrote:

> As far as I can tell I should have a route for start/about using GET  
> however Rails is convinced I want the show method, which I am unaware  
> I was asking for.

Have you tried running ‘rake routes’ to see what routes you’ve actually  
created?

Why don’t you start with that and then, maybe, ask something like  
‘Here’s what I’ve done and what it’s created. What do I need to do to  
create a route that will work with this area tag I want to use?’

Best regards,  
Bill

---

<div class="post-metadata">

**Author:** ![Glen](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/g/8c91f0/32.png) [@Glen](https://www.ruby-forum.com/u/Glen)\
**Post date:** [August 25, 2009, 6:52am UTC](https://www.ruby-forum.com/t/more-routing-problems/174328/3 "2009-08-25T06:52:15Z")

</div>

Hi Glen,

map.resources :start, :member =\> { :about =\> :get } will produces /  
start/:id/about

map.resources :start, :collection =\> { :about =\> :get } will get you /  
start/about

Maybe you want to change that and see if it works since your link is  
href="/start/about"

Cheers!  
Arzumy

---

<div class="post-metadata">

**Author:** ![Glen](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/g/8c91f0/32.png) [@Glen](https://www.ruby-forum.com/u/Glen)\
**Post date:** [August 25, 2009, 9:16am UTC](https://www.ruby-forum.com/t/more-routing-problems/174328/4 "2009-08-25T09:16:55Z")

</div>

Hi Glen,  
When I wish to map a particular action apart from the standard one, I  
use  
the following route :

map.resources :start, :collection =\> { :about=\> :get }

Perhaps that should help you.

Thanks & Regards,  
Dhruva S…

## Ogden Nash [http://www.brainyquote.com/quotes/authors/o/ogden\_nash.html](http://www.brainyquote.com/quotes/authors/o/ogden_nash.html)

“The trouble with a kitten is that when it grows up, it’s always a cat.”

---

<div class="post-metadata">

**Author:** ![Glen](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/g/8c91f0/32.png) [@Glen](https://www.ruby-forum.com/u/Glen)\
**Post date:** [August 25, 2009, 3:03pm UTC](https://www.ruby-forum.com/t/more-routing-problems/174328/5 "2009-08-25T15:03:31Z")

</div>

Thanks guys that worked. I can also use only with a collection  
route. However I’m still puzzled as to why only doesn’t work with a  
member route does the syntax just need to be more exact for a member  
route? For example something like :only =\>  
[:index, :start/:id/:about]?
