# Link\_to :back problem

**URL:** <https://www.ruby-forum.com/t/link-to-back-problem/167323>\
**Category:** Rails\
**Created:** [May 6, 2009, 6:17pm UTC](https://www.ruby-forum.com/t/link-to-back-problem/167323 "2009-05-06T18:17:34Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![elliottg](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/e/b77776/32.png) [@elliottg](https://www.ruby-forum.com/u/elliottg)\
**Post date:** [May 6, 2009, 6:17pm UTC](https://www.ruby-forum.com/t/link-to-back-problem/167323/1 "2009-05-06T18:17:34Z")

</div>

Hello,

I have used \<%= link\_to “Back”, :back %\> many times with no issues.  
This time I am getting this error:

Unknown action  
No action responded to index. Actions: access\_denied, check\_roles,  
create, new, role\_requirements, role\_requirements=, and update

Any thoughts on this? I really need to use :back as the page I am  
trying to go “back” to is part of a somewhat complex multipage form.  
And I don’t want to resend a lot of info back to the form just to get  
off of the tiny static “privacy policy” page.

Thanks for the help.  
Elliott

---

<div class="post-metadata">

**Author:** ![elliottg](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/e/b77776/32.png) [@elliottg](https://www.ruby-forum.com/u/elliottg)\
**Post date:** [May 6, 2009, 7:29pm UTC](https://www.ruby-forum.com/t/link-to-back-problem/167323/2 "2009-05-06T19:29:48Z")

</div>

Anybody have any ideas on this one?

Thanks

---

<div class="post-metadata">

**Author:** ![elliottg](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/e/b77776/32.png) [@elliottg](https://www.ruby-forum.com/u/elliottg)\
**Post date:** [May 7, 2009, 1:54am UTC](https://www.ruby-forum.com/t/link-to-back-problem/167323/3 "2009-05-07T01:54:27Z")

</div>

error log?

elliottg wrote:

> trying to go “back” to is part of a somewhat complex multipage form.  
> And I don’t want to resend a lot of info back to the form just to get  
> off of the tiny static “privacy policy” page.
> 
> Thanks for the help.  
> Elliott

# –

Tomas Meinlschmidt, MS {MCT, MCP+I, MCSE, AER}, NetApp Filer/NetCache

# [www.meinlschmidt.com](http://www.meinlschmidt.com) www.maxwellrender.cz www.lightgems.cz

---

<div class="post-metadata">

**Author:** ![elliottg](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/e/b77776/32.png) [@elliottg](https://www.ruby-forum.com/u/elliottg)\
**Post date:** [May 7, 2009, 2:28am UTC](https://www.ruby-forum.com/t/link-to-back-problem/167323/4 "2009-05-07T02:28:11Z")

</div>

Elliott G. wrote:

> Hello,
> 
> I have used \<%= link\_to “Back”, :back %\> many times with no issues.  
> This time I am getting this error:
> 
> Unknown action  
> No action responded to index. Actions: access\_denied, check\_roles,  
> create, new, role\_requirements, role\_requirements=, and update
> 
> Any thoughts on this? I really need to use :back as the page I am  
> trying to go “back” to is part of a somewhat complex multipage form.  
> And I don’t want to resend a lot of info back to the form just to get  
> off of the tiny static “privacy policy” page.
> 
> Thanks for the help.  
> Elliott

That error message seems to indicate that :back creates a link to the  
index action of the controller. The message says that it can’t find an  
index action and then lists the actions it did find.

My book says :back refers to the url in the HTTP\_REFERER header in the  
current request. Maybe :back isn’t finding any url, so link\_to is  
defaulting to :index?

---

<div class="post-metadata">

**Author:** ![elliottg](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/e/b77776/32.png) [@elliottg](https://www.ruby-forum.com/u/elliottg)\
**Post date:** [May 7, 2009, 4:27am UTC](https://www.ruby-forum.com/t/link-to-back-problem/167323/5 "2009-05-07T04:27:01Z")

</div>

7stud – wrote:

> My book says :back refers to the url in the HTTP\_REFERER header in the  
> current request. Maybe :back isn’t finding any url, so link\_to is  
> defaulting to :index?

I tested that out, and it seems that when you don’t specify an action  
for link\_to, the action defaults to the current action.
