浏览代码

Fix crash

Maarten van den Berg 6 年之前
父节点
当前提交
9c1926950b
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      app/helpers/authentication_helper.rb

+ 1 - 1
app/helpers/authentication_helper.rb

60
   def logged_in?
60
   def logged_in?
61
     # Case 1: User has an active session inside the cookie.
61
     # Case 1: User has an active session inside the cookie.
62
     # We verify that the session hasn't expired yet.
62
     # We verify that the session hasn't expired yet.
63
-    if session[:user_id] && session[:expires]&.future?
63
+    if session[:user_id] && session[:expires]&.to_datetime&.future?
64
 
64
 
65
       user_session
65
       user_session
66
 
66