I'm using Devise 2.0.4 (with devise-neo4j), Warden 1.1.1, Rails 3.2.3.
When I sign in without remember me option checked, I can sign out without a problem.
However when I sign in using remember me option I cannot sign out.
Digging in the code I found out that the before_logout hook present in devise-2.0.4/lib/devise/hooks/forgetable.rb
(Warden::Manager.before_logout do |record, warden, options|
) is called with record => nil
.
I'm not sure whether it's Devise bug, Warden's or mine…</p>
The stacktrace is as follows:
devise-2.0.4/lib/devise/hooks/forgetable.rb:7:in `(root)'
org/jruby/RubyProc.java:258:in `call'
warden-1.1.1/lib/warden/hooks.rb:14:in `_run_callbacks'
org/jruby/RubyArray.java:1615:in `each'
warden-1.1.1/lib/warden/hooks.rb:9:in `_run_callbacks'
warden-1.1.1/lib/warden/manager.rb:53:in `_run_callbacks'
warden-1.1.1/lib/warden/proxy.rb:243:in `logout'
org/jruby/RubyArray.java:1615:in `each'
warden-1.1.1/lib/warden/proxy.rb:241:in `logout'
devise-2.0.4/lib/devise/controllers/helpers.rb:159:in `sign_out_all_scopes'
devise-2.0.4/lib/devise/controllers/helpers.rb:139:in `sign_out'
devise-2.0.4/app/controllers/devise/sessions_controller.rb:23:in `destroy'