From 4c3dbcecb652bc529e8f659394fb067b02f49113 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Vanicat?= Date: Wed, 17 Nov 2010 17:22:01 +0100 Subject: [PATCH] Fixe a bug in authlogic. See https://github.com/binarylogic/authlogic/issues/issue/101 --- app/models/user_session.rb | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/app/models/user_session.rb b/app/models/user_session.rb index e7556cb..ec55ada 100644 --- a/app/models/user_session.rb +++ b/app/models/user_session.rb @@ -1,3 +1,6 @@ class UserSession < Authlogic::Session::Base # configuration here, see documentation for sub modules of Authlogic::Session -end \ No newline at end of file + def to_key + new_record? ? nil : [ self.send(self.class.primary_key) ] + end +end