Sha256: a736137f82494881f00f23275379513b52b78ac3005bcaec871305560eda4737

Contents?: true

Size: 512 Bytes

Versions: 4

Compression:

Stored size: 512 Bytes

Contents

module Warden::Mixins::Common
  def request
    @request ||= ActionDispatch::Request.new(env)
  end

  def reset_session!
    raw_session.inspect # why do I have to inspect it to get it to clear?
    raw_session.clear
  end

  def response
    @response ||= env['action_controller.instance'].response
  end
end

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

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

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
devise-1.1.pre4 lib/devise/rails/warden_compat.rb
devise-1.1.pre3 lib/devise/rails/warden_compat.rb
devise-1.1.pre2 lib/devise/rails/warden_compat.rb
devise-1.1.pre lib/devise/rails/warden_compat.rb