I use this: <%= link_to "Logout", logout_path %>
And here's the custom route: map.logout '/logout', :controller => 'sessions', :action => 'destroy'The way restful_authentication is setup, the destroy action doesn't actually require an ID be passed to it.
On Aug 16, 2007, at 1:42 PM, richard apodaca wrote: I'm building an app using restful_authentication. It works great, but I have a question about logging out. I currently give the user a "logout" button built from: link_to "logout", session_url(session.id), :method => :delete This constructs a URL like: http://localhost:3000/sessions/-611266728 Now, on the face of it, I can't see anything wrong, but it just doesn't smell right to so clearly spell out how sessions work for an app. In digging around, I did find this: http://www.ruby-forum.com/topic/82348 which seems to suggest that the way I'm doing it is the way the plugin was designed to be used: Any experience with this issue out there? many thanks, Rich ____________________________ Richard Apodaca Blog: http://depth-first.com _______________________________________________ Sdruby mailing list [email protected] http://lists.sdruby.com/mailman/listinfo/sdruby
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________ Sdruby mailing list [email protected] http://lists.sdruby.com/mailman/listinfo/sdruby
