I'm stuck here too...no mention of this in documentation (that I could
see). When I click on the activate link in the activation email it
errors "no route found to match "/activate/d8e1326e13c18a" with
{:method=>:get}"
2) The action 'activate' in the users controller - with the
activation_code parameter passed in too.
# use :code, :token, :id, :foobarbaz, whatever you like
map.connect 'activate/:code', :controller => 'users', :action => 'activate'
Bonus question - should I be using singleton resources, as mentioned
in the comments on:
The last time the plugin was updated was before singleton resources.
Please do send in a nice patch if you'd like to see singleton
resources in the restful auth plugin.
1 - My model is called User
2 - My end-user-visible signup and preferences/password management is
done through AccountController which is a *singleton* because users
can't see other users and you can only have one account.
3 - Administrators *can* see other users (plus extra data users can't
see about themselves) so for that purpose they have a UsersController
Hopefully that explains why I chose :account as a singleton rather
than a collection.
And, that should also illustrate that yes, your :session resource is
*also* a singleton - each HTTP session can only have one logical
session so it's a singleton.
The Session#Destroy in its default state accepts a get. i.e. /logout.
It's not destroying an Active Record object, just the session, so I
think it's a useful feature. Note that restful_authenttication doesn't
have a User#Destroy method- that would certainly need a delete method.
That makes sense. I decided to try it for myself and as I was writing it I realized that my new logout_url wouldn’t be part of the map.resources and thus not bound by its methods. Heh.
The last time the plugin was updated was before singleton resources.
Please do send in a nice patch if you'd like to see singleton
resources in the restful auth plugin.
I've just been through and converted it all, so I'll throw something
together now.