[Ruby] user is online in Rails

ben wiseley wiseleyb at gmail.com
Wed Dec 6 07:57:37 PST 2006


We wanted to have something that showed when someone is online on our site
(like they do on many of those PHP forums).  How do you pull this off in
Rails?

In .Net there's a session end event you can work with.

Anything exist like that in Rails?

I was thinking you could do this with filters in application.rb by doing a
before_filter, check the session object, if nil - it's expired, find the
users perm cookie, mark them off line.  Is that the best way to do this?

-ben


More information about the Ruby mailing list