Do you know how that is achieved?

I was assuming the page (application.rhtml) is used as the template
for the whole site, so wasn't expecting to have to configure the links
throughout the site.

I'm new to this, so it's probably easy - but i'm maybe looking at it
from the wrong angle.

So - if the links currently work at: http://localhost:3000/site/about

what exactly should the pages look like if the link looks like:
http://localhost:3000/user/register

does the action need adding to the user action, or the register?

On 27 Aug, 21:09, Colin Law <clan...@googlemail.com> wrote:
> 2009/8/27 RubyonRails_newbie <craigwest...@googlemail.com>:
>
>
>
>
>
>
>
> > Hello all...
>
> > I am on Chapter 4 of RailsSpace and I have hit a problem when it comes
> > to linking in the document.
>
> > To start with in an earlier chapter I created a page called site.rhtml
> > which used these attributes:
> > <%= link_to_unless_current "Home",               :action        => "index"  
> > %>  |
> >  <%= link_to_unless_current "About Us",         :action        => "about"  
> > %>  |
> >  <%= link_to_unless_current "Help",             :action    => "help"   %>
>
> > This is in the site class that was created (localhost:3000/site/index)
>
> > All these links work a treat - basic i know, but all work in progress.
>
> > NOw on Chapter 4, it's time to create a page to register users.
> > I have a page now (localhost:3000/user/register)
>
> > However, for some reason, the links no longer work, despite me
> > updating the main file from site.rhtml to application.rhtml as the
> > RailsSpace book suggests.
>
> > If I am on the register page, and click 'help' I get the following:
>
> > No action responded to help. Actions: index and register
>
> Assuming I understand, you have a help link on the user/register page
> as you have shown above on the site/index page.  Since in this link
> you have specified only the action this will attempt to call that
> action (help) on the current controller, ie user.  Since you have only
> provided index and register actions you get the message shown.  Either
> you must provide a help action on the user controller, or if you want
> to call the help action on the site controller then specify
> :controller => "site" in the link as well as the action.
>
> Hope this helps
>
> Colin
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to