# link\_to problem

**URL:** <https://discuss.rubyonrails.org/t/link-to-problem/32797>\
**Category:** rubyonrails-talk\
**Created:** [August 4, 2008, 10:26pm UTC](https://discuss.rubyonrails.org/t/link-to-problem/32797 "2008-08-04T22:26:13Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![11175](https://avatars.discourse-cdn.com/v4/letter/1/8edcca/32.png) [@11175](https://discuss.rubyonrails.org/u/11175)\
**Post date:** [August 4, 2008, 10:26pm UTC](https://discuss.rubyonrails.org/t/link-to-problem/32797/1 "2008-08-04T22:26:13Z")

</div>

\<%= link\_to "New", { :controller =\> :threads, :action=\>:new\_requirement } %\>

When I click on the link it displays the error page:

Unknown action No action responded to show

Why is this? Thanks!

---

<div class="post-metadata">

**Author:** ![arbolurbano](https://avatars.discourse-cdn.com/v4/letter/a/c5a1d2/32.png) [@arbolurbano](https://discuss.rubyonrails.org/u/arbolurbano)\
**Post date:** [August 5, 2008, 12:18am UTC](https://discuss.rubyonrails.org/t/link-to-problem/32797/2 "2008-08-05T00:18:21Z")

</div>

This can sound stupid, but, ¿Do u define the function :new\_requeriment in you threads controller?

---

<div class="post-metadata">

**Author:** ![Hubert\_Lepicki1](https://avatars.discourse-cdn.com/v4/letter/h/d2c977/32.png) [@Hubert\_Lepicki1](https://discuss.rubyonrails.org/u/Hubert_Lepicki1)\
**Post date:** [August 5, 2008, 6:55am UTC](https://discuss.rubyonrails.org/t/link-to-problem/32797/3 "2008-08-05T06:55:31Z")

</div>

Looks to me that you are using "map.resources :threads" in your routes.rb and that maps anything with /threads/whatever to :action =\> show, :id =\> "whatever".

To get around this, you might want to simply use "new" actoin that's mapped by standard when using restful routing. Or, if you really want "new\_requirement", please consider adding :collection =\> { :new\_requirement =\> :get } to your resource section in routes.rb.

---

<div class="post-metadata">

**Author:** ![radar](https://sea2.discourse-cdn.com/rubyonrails/user_avatar/discuss.rubyonrails.org/radar/32/604_2.png) [@radar](https://discuss.rubyonrails.org/u/radar)\
**Post date:** [August 5, 2008, 7:08am UTC](https://discuss.rubyonrails.org/t/link-to-problem/32797/4 "2008-08-05T07:08:13Z")

</div>

Sounds to me like requirements are another resource. I recommend making another controller for requirements if this is so.

---

<div class="post-metadata">

**Author:** ![11175](https://avatars.discourse-cdn.com/v4/letter/1/8edcca/32.png) [@11175](https://discuss.rubyonrails.org/u/11175)\
**Post date:** [August 5, 2008, 12:16pm UTC](https://discuss.rubyonrails.org/t/link-to-problem/32797/5 "2008-08-05T12:16:47Z")

</div>

Ryan Bigg wrote:

> Sounds to me like requirements are another resource. I recommend making another controller for requirements if this is so.

Hi , justint Define method or action in ur controller ! and also emphasis on naming conversation .

\<=% link\_to "New" :controller =\> "controller\_name", :action =\>"action\_name" ,:id =\>@instant\_var%\>

---

<div class="post-metadata">

**Author:** ![11175](https://avatars.discourse-cdn.com/v4/letter/1/8edcca/32.png) [@11175](https://discuss.rubyonrails.org/u/11175)\
**Post date:** [August 5, 2008, 4:09pm UTC](https://discuss.rubyonrails.org/t/link-to-problem/32797/6 "2008-08-05T16:09:36Z")

</div>

routes.rb: &nbsp;&nbsp;map.resources :users, :threads

I still get the same error.

And I'm not exactly sure what you're telling me to do Hubert.

Thanks
