RAILS: Authlogic gem & Userstamp plugin

Go To StackoverFlow.com

1

I have an application that uses the Authlogic gem and needs the functionality of the Userstamp plugin.

AFAIK Userstamp works very well with RestfulAuthentication, though I couldn't find anything mentioning using it together with Authlogic.

Has anyone of you tried to combine them? Are there issues I should be aware of? Should I use a completely different plugin/gem to get the functionality of Userstamp in combination with Authlogic?

Thanks a lot for your help!

2009-06-16 08:56
by Javier


1

Well, I just found it out the hard way. ;-)

If you use Authlogic (2.0.11) in combination with Userstamp (2.0) make sure that Authlogic's current_user method in the ActionController is protected and not private (as is the default). Or you'll get a NoMethodError in User sessionsController#new.

Besides that it just works like a charm.

P.S.: There's no need to manually implement the set_stamper method in the ActionController. Authlogic and Userstamp work well with the method defined by the Userstamp plugin. If you've no idea what I'm talking about, just ignore this. :-)

2009-06-19 13:05
by Javier