auto-session-timeout - Ruby on Rails -


I'm new to Rail on Ruby. Mani is trying to end the session time out of auto-session-time. My session is ending. But what do I want to do when the session is over, I should go to a specific link (say www.abcd.com). I want a method even when the session expires. Now after 1 minute when I reload my session, it ends, but it moves to the same page.

I have this in my application controller

  auto_session_timeout 1.minute   

and in my routes

  matches 'active' = & gt; 'Session # active' match 'timeout' = & gt; 'Session # timeout'   

and in my session controller

  DIF activated P "-------------- Active - ------------- "End Def Timeout P" ------------ Timeout -------------- "Rest Client Post 'http: //www.abcd.com' ,: ApplicationName = & gt; 'ABCD website and application',: URL = & gt; 'http://www.xyz.com/login/' end   

I think I will find this method when the session expires. But it is not working Thanks in advance

edit your file-config / initializers / session_store.rb

  app :: application.config.session_store: cookie_store ,: key = & gt; "_yourapp_session" ,: expire_after = & gt; 2.minutes   

and then you in-app controller: before_filter: authenticate

  certify deaf some_path redirect_to some_path if the session [: session_key] .nil? End   

Note: You must manually set a session key. Also, check this answer that should help

Comments

Popular posts from this blog

Verilog Error: output or inout port "Q" must be connected to a structural net expression -

jasper reports - How to center align barcode using jasperreports and barcode4j -

c# - ASP.NET MVC - Attaching an entity of type 'MODELNAME' failed because another entity of the same type already has the same primary key value -