Rails uses :expire_after in the session options to specify when a
sesssion should expire, but when Rack sets the cookie it expects to
see :expires in the cookie options but Rails 2.3.11 fails to do the
conversion so doesn't set the cookie expiry.
To work around this, we set both options in the session options...
def _persist_session
if session[session_persistence_key]
def _persist_session
if session[session_persistence_key]
- request.session_options = request.session_options.dup
+ request.session_options[:expires] = Time.now + session[session_persistence_key]
request.session_options[:expire_after] = session[session_persistence_key]
request.session_options[:expire_after] = session[session_persistence_key]
- request.session_options.freeze