How to get a list of online users in Authlogic?

2019-06-13 14:46发布

问题:

I've added a last_request_at field to my user table in Ruby on Rails, so now I can call the authlogic method User.logged_in.count and it returns the correct value. But how do I get a list of all logged in users? Thanks for reading.

回答1:

User.logged_in.all ?