Skip to content

Commit

Permalink
Update authenticatable.rb
Browse files Browse the repository at this point in the history
  • Loading branch information
josevalim committed Feb 14, 2015
1 parent d2658c6 commit 2992b41
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/devise/models/authenticatable.rb
Original file line number Diff line number Diff line change
Expand Up @@ -206,8 +206,10 @@ module ClassMethods
: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

Expand Down

0 comments on commit 2992b41

Please sign in to comment.