<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -18,6 +18,8 @@ module Devise
           options[:params]
       end
 
+      env['warden'].logout
+
       redirect_path = if mapping = Devise.mappings[scope]
         &quot;#{mapping.parsed_path}/#{mapping.path_names[:sign_in]}&quot;
       else</diff>
      <filename>lib/devise/failure.rb</filename>
    </modified>
    <modified>
      <diff>@@ -13,7 +13,11 @@ Warden::Manager.serialize_into_session{ |user| [user.class, user.id] }
 # Session Serialization out. This block gets the user out of the session.
 # It should be the reverse of serializing the object into the session
 Warden::Manager.serialize_from_session do |klass, id|
-  klass.find(id)
+  begin
+    klass.find(id)
+  rescue ActiveRecord::RecordNotFound
+    throw(:warden)
+  end
 end
 
 # Setup devise strategies for Warden</diff>
      <filename>lib/devise/warden.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>05678e773fbeca9a0b251e1aad72a573d8ac5a75</id>
    </parent>
  </parents>
  <author>
    <name>Ramon Soares</name>
    <email>eu@ramonsoares.com</email>
  </author>
  <url>http://github.com/ramon/devise/commit/5d97626a6d0cfd7682f0cfb7ecb5edf0688fedfb</url>
  <id>5d97626a6d0cfd7682f0cfb7ecb5edf0688fedfb</id>
  <committed-date>2009-11-08T13:36:31-08:00</committed-date>
  <authored-date>2009-11-08T13:36:31-08:00</authored-date>
  <message>fix record not found failure in recovery session</message>
  <tree>3302476a4856dfafc12964e4a44b583338b881db</tree>
  <committer>
    <name>Ramon Soares</name>
    <email>eu@ramonsoares.com</email>
  </committer>
</commit>
