your question may be related to this question: How do I dynamically set the expiration time for a cookie based session in Rails
one of the comments points to outdated slides :
". If you need to set a validity period for sessions across all controllers in your application, just add the following option for your config / initializers / session_store.rb file:
:expire_after => 60.minutes
If you need to set different expiration dates in different controllers or actions, use the following code in action or some before_filter:
request.session_options = request.session_options.dup request.session_options[:expire_after]= 5.minutes request.session_options.freeze
Duplication of the hash is necessary only because it is already frozen at the same time although the change is the smallest: expire_after is possible and works flawlessly ... "
Hope this helps. :)
pageman Aug 05 '09 at 9:51 2009-08-05 09:51
source share