I am using Devise for my users to log into my Ruby on Rails 3.0.9 web application. I’m unfamiliar with how sessions work. They are managed by the browser and not the application right?
I would like to get a list of users who are currently online. And eventually do some kind of background process to automatically update this list.
How would I accomplish this? Is there a gem that would assist?
Thank you,
Andy
One way to do it is have a column
last_seen_atand update that column in yourcurrent_usermethod:Then consider anyone who was last seen in the last 5 minutes as “currently signed in”.