Forum: Ruby on Rails link_to :back problem

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
7bd5cba5820168467074439c6a03c76b?d=identicon&s=25 Elliott Golden (elliottg)
on 2009-05-06 18:17
(Received via mailing list)
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
7bd5cba5820168467074439c6a03c76b?d=identicon&s=25 Elliott Golden (elliottg)
on 2009-05-06 19:29
(Received via mailing list)
Anybody have any ideas on this one?

Thanks
1e7782e67bb34c9c67ed19d5cde5f4eb?d=identicon&s=25 Tom Z Meinlschmidt (Guest)
on 2009-05-07 01:54
(Received via mailing list)
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  www.maxwellrender.cz  www.lightgems.cz
===============================================================================
54404bcac0f45bf1c8e8b827cd9bb709?d=identicon&s=25 7stud -- (7stud)
on 2009-05-07 02:28
Elliott Golden 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?
54404bcac0f45bf1c8e8b827cd9bb709?d=identicon&s=25 7stud -- (7stud)
on 2009-05-07 04:27
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.
This topic is locked and can not be replied to.