1
0
Fork 0
mirror of https://github.com/heartcombo/devise.git synced 2022-11-09 12:18:31 -05:00

Use to_adapter.get in Warden::SessionSerializer#deserialize

This commit is contained in:
Jared Morgan 2010-10-17 04:17:10 +08:00 committed by José Valim
parent 31170b9100
commit 0aa21dca4c

View file

@ -27,7 +27,7 @@ class Warden::SessionSerializer
klass, id, salt = keys
begin
record = klass.constantize.to_adapter.find_first({ :id => id.first })
record = klass.constantize.to_adapter.get(id)
record if record && record.authenticatable_salt == salt
rescue NameError => e
if e.message =~ /uninitialized constant/