]> git.openstreetmap.org Git - rails.git/blobdiff - lib/session_persistence.rb
Use PNG logo for og:image
[rails.git] / lib / session_persistence.rb
index 7d45d1fc4e59af2c067aca4049f2f7d56808861f..2244a3e63f50d5c6e6fac98fcfa8a78a4215595a 100644 (file)
@@ -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