views:

24

answers:

1

I'm using RestfulRoutes written by Steve Hodgkiss. So far so good but I do have a question. I have a Session Controller that I want to use to destroy a users session when they click the logout button. How can I do this with and action link?

So far I have the following.

<%= Html.ActionLink("Logout", "Destroy", "Session") %>

I need to hit the following route.

Session/{id} and have a DELETE constraint.

I hope this makes sense.

Mike

+1  A: 

An anchor tag in HTML can only ever issue a GET, it cannot issue any other verbs (unless you intervene with JavaScript).

Brad Wilson