X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/e660e609661edadc1ed5ad49d6e83e936b2f91cd..4e64291839d45a0c660fc84f11a6c4c811cf8f21:/lib/session_persistence.rb?ds=sidebyside diff --git a/lib/session_persistence.rb b/lib/session_persistence.rb index 7d45d1fc4..2244a3e63 100644 --- a/lib/session_persistence.rb +++ b/lib/session_persistence.rb @@ -37,7 +37,7 @@ module SessionPersistence # session_expires_after 1.hour # session_expires_after 2.weeks def session_expires_after(seconds) - session[session_persistence_key] = seconds + session[session_persistence_key] = seconds end # Expire the session. @@ -51,5 +51,7 @@ module SessionPersistence if session[session_persistence_key] request.session_options[:expire_after] = session[session_persistence_key] end + rescue + reset_session end end