E
E
eldar_web2015-09-29 13:21:29
Ruby on Rails
eldar_web, 2015-09-29 13:21:29

How to fix session closing in Ruby on Rails???

I want to create a hits table.
So, at the entrance, when we set the session: session[:user_id] = '1', and when it exits by clicking on the exit, we destroy it, and so we get to fix the entrance and exit.
But how can you fix the exit if the user exited without clicking on the exit, but simply by closing the browser, or without closing, the main thing is that he became inactive???

Answer the question

In order to leave comments, you need to log in

1 answer(s)
J
Jeiwan, 2015-09-29
@Jeiwan

Track the user's activity, if he was inactive for a while, then he left / closed the browser / closed the tab / formatted the hard drive / went to live in the forest.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question