On Oct 6, 5:25 am, JHuizingh <[EMAIL PROTECTED]> wrote:

> And the layout generates the following html:
>
>   <a href="http://localhost:3000/session/logoff";>logout</a>
>
> When I click on the logoff link, here is the error that shows up on
> the resulting page:
>
>   ActionController::MethodNotAllowed
>   Only delete requests are allowed.

Well you've sort of figured it out yourself - Your routing demands a
DELETE method, but your link is a plain old GET.
Either you change your routing to accept GET requests or you use
the :method option to link_to to fake up a DELETE request (watch out,
this relies on javascript)

Fred
>
> I know that the url has to somehow signify that the delete method is
> to be used since web browsers don't support the delete method, but I'm
> not sure what I'm doing wrong.  Can anybody help?
>
> Thanks,
> Jonathan
--~--~---------~--~----~------------~-------~--~----~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to