Skip to content

Commit

Permalink
Merge pull request #2882 from hauleth/fix-mongoid-10068
Browse files Browse the repository at this point in the history
Devise + Mongoid store wrong data in session
  • Loading branch information
josevalim committed Feb 14, 2015
2 parents 893a022 + 4064155 commit d2658c6
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/devise/models/authenticatable.rb
Original file line number Diff line number Diff line change
Expand Up @@ -206,8 +206,9 @@ module ClassMethods
:case_insensitive_keys, :http_authenticatable, :params_authenticatable, :skip_session_storage,
:http_authentication_key)


def serialize_into_session(record)
[record.to_key, record.authenticatable_salt]
[[*record.to_key].first.to_s, record.authenticatable_salt]
end

def serialize_from_session(key, salt)
Expand Down

0 comments on commit d2658c6

Please sign in to comment.