From fff5a755d367dba9d1f845ca64653c7893915e5a Mon Sep 17 00:00:00 2001 From: Tom Hughes Date: Wed, 25 Oct 2017 08:59:29 +0100 Subject: [PATCH] Convert session timeout to seconds when it is set This avoids problems if the rails Duration class changes representation between different versions of rails. --- lib/session_persistence.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/session_persistence.rb b/lib/session_persistence.rb index ac0e690c2..5e933f48a 100644 --- a/lib/session_persistence.rb +++ b/lib/session_persistence.rb @@ -41,7 +41,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.to_i end # Expire the session. -- 2.43.2