Skip to content

Commit

Permalink
Fixed mongoid, devise error after login
Browse files Browse the repository at this point in the history
  • Loading branch information
ndd314 committed Dec 5, 2014
1 parent d2cbc49 commit a966be6
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions app/models/user.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ class User
devise :database_authenticatable, :registerable,
:recoverable, :rememberable, :trackable, :validatable

def self.serialize_into_session(record)
[record.id.to_s, record.authenticatable_salt]
end

## Database authenticatable
field :email, type: String, default: ""
field :encrypted_password, type: String, default: ""
Expand Down

0 comments on commit a966be6

Please sign in to comment.