Class: Warden::SessionSerializer

Inherits:
Object
  • Object
show all
Defined in:
lib/devise/rails/warden_compat.rb

Instance Method Summary collapse

Instance Method Details

#deserialize(keys) ⇒ Object



21
22
23
24
# File 'lib/devise/rails/warden_compat.rb', line 21

def deserialize(keys)
  klass, id = keys
  klass.find(:first, :conditions => { :id => id })
end

#serialize(record) ⇒ Object



17
18
19
# File 'lib/devise/rails/warden_compat.rb', line 17

def serialize(record)
  [record.class, record.id]
end