mirror of
https://github.com/heartcombo/devise.git
synced 2026-04-28 03:00:29 -04:00
Warn in case you are using the previous session schema, closes #386
This commit is contained in:
@@ -20,6 +20,13 @@ class Warden::SessionSerializer
|
||||
|
||||
def deserialize(keys)
|
||||
klass, id = keys
|
||||
|
||||
if klass.is_a?(Class)
|
||||
raise "Devise changed how it stores objects in session. If you are seeing this message, " <<
|
||||
"you can fix it by changing one character in your cookie secret, forcing all previous " <<
|
||||
"cookies to expire, or cleaning up your database sessions if you are using a db store."
|
||||
end
|
||||
|
||||
klass.constantize.find(:first, :conditions => { :id => id })
|
||||
rescue NameError => e
|
||||
if e.message =~ /uninitialized constant/
|
||||
|
||||
Reference in New Issue
Block a user