Ruby on rails - Authlogic : periodically check if user session is valid
问题 I'm looking for a solution allowing me to check periodically if the user session has expired and if so redirect him to the login page. I'm using Authlogic gem, so what I'm doing is call a function that make a test on current_user. My USER_SESSION_TIMEOUT is 5minutes so I make this ajax call every 5:10 minutes. <%= periodically_call_remote :url => {:controller => 'user_session', :action => 'check_session_timed_out'}, :frequency => (USER_SESSION_TIMEOUT + 10.seconds) %> def check_session_timed