# Simple Routing Error

**URL:** <https://www.ruby-forum.com/t/simple-routing-error/133487>\
**Category:** Rails\
**Created:** [April 1, 2008, 12:35am UTC](https://www.ruby-forum.com/t/simple-routing-error/133487 "2008-04-01T00:35:36Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![sjglazer](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/ee59a6/32.png) [@sjglazer](https://www.ruby-forum.com/u/sjglazer)\
**Post date:** [April 1, 2008, 12:35am UTC](https://www.ruby-forum.com/t/simple-routing-error/133487/1 "2008-04-01T00:35:36Z")

</div>

Hello there,

I want to display a help icon and when users click it a simple static  
page to open in a pop-up.

In My View I have:

\<%= link\_to image\_tag(“info\_small.gif”) , { :action =\> “help”,  
:controller =\> “restaurants”}, :popup =\> [‘new\_window’,  
‘height=300,width=600’] %\>

In My Controller I have:

def help  
@message = ‘hello’  
end

I have a help.rhtml file with some static text. Every time I click on  
the image I get the following error in the pop up menu:

Couldn’t find Restaurant with ID=help

Any Idea whats going on and how I can fix it?

Thanks,  
steve

---

<div class="post-metadata">

**Author:** ![sjglazer](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/ee59a6/32.png) [@sjglazer](https://www.ruby-forum.com/u/sjglazer)\
**Post date:** [April 1, 2008, 12:57am UTC](https://www.ruby-forum.com/t/simple-routing-error/133487/2 "2008-04-01T00:57:11Z")

</div>

Steve G. wrote:

> Couldn’t find Restaurant with ID=help

This means you have RESTful routes. By default, the line:

map.resources :restaurants

means you have just 7 actions available:

#index, #new, #create, #edit, #update, #destroy, #show

To use more actions, you need to specify them in config/routes.rb with  
something like:

map.resources :restaurants, :collection =\> {:help =\> :get}

For more info:

[http://api.rubyonrails.com/classes/ActionController/Resources.html#M000308](http://api.rubyonrails.com/classes/ActionController/Resources.html#M000308)

---

<div class="post-metadata">

**Author:** ![sjglazer](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/ee59a6/32.png) [@sjglazer](https://www.ruby-forum.com/u/sjglazer)\
**Post date:** [April 1, 2008, 1:17am UTC](https://www.ruby-forum.com/t/simple-routing-error/133487/3 "2008-04-01T01:17:44Z")

</div>

Thanks for the tip. Seems to work now.

Thanks,  
steve

Mark B. wrote:

> Steve G. wrote:
> 
> > Couldn’t find Restaurant with ID=help
> 
> This means you have RESTful routes. By default, the line:
> 
> map.resources :restaurants
> 
> means you have just 7 actions available:
> 
> #index, #new, #create, #edit, #update, #destroy, #show
> 
> To use more actions, you need to specify them in config/routes.rb with  
> something like:
> 
> map.resources :restaurants, :collection =\> {:help =\> :get}
> 
> For more info:
> 
> [Peak Obsession](http://api.rubyonrails.com/classes/ActionController/Resources.html#M000308)
