开发者

How to find out currently logged in users in Rails 2.3.5?

开发者 https://www.devze.com 2022-12-27 12:13 出处:网络
Does any one know solution to tracking online users in Rails; when you have cookie based sessions? I 开发者_StackOverflow社区am using Rails 2.3.5. If yes please let me know.

Does any one know solution to tracking online users in Rails; when you have cookie based sessions? I 开发者_StackOverflow社区am using Rails 2.3.5. If yes please let me know.

Thanks, Atul


You haven't said how you're doing authentication, but I'm guessing that you have a controller that creates a session when a user logs in and destroys it when they log out again. You could have those actions also add and remove (respectively) a record from a database table to enable you to track each user.

0

精彩评论

暂无评论...
验证码 换一张
取 消