Update authenticatable.rb

This commit is contained in:
José Valim
2015-02-14 11:02:13 +01:00
parent d2658c6e35
commit 2992b411a2

View File

@@ -206,8 +206,10 @@ module Devise
:case_insensitive_keys, :http_authenticatable, :params_authenticatable, :skip_session_storage,
:http_authentication_key)
def serialize_into_session(record)
# This is a work around a mongoid bug, that's why we do
# the whole *record.to_key dance. Hopefully we can remove
# this once mongoid generates proper to_key ids.
[[*record.to_key].first.to_s, record.authenticatable_salt]
end