Sha256: dd515387458e2bb01dc8cf08a561ab27dd3986d7b4c48d3ba092c0abe9db67c9

Contents?: true

Size: 433 Bytes

Versions: 43

Compression:

Stored size: 433 Bytes

Contents

# Before logout hook to forget the user in the given scope, if it responds
# to forget_me! Also clear remember token to ensure the user won't be
# remembered again. Notice that we forget the user unless the record is not persisted.
# This avoids forgetting deleted users.
Warden::Manager.before_logout do |record, warden, options|
  if record.respond_to?(:forget_me!)
    Devise::Hooks::Proxy.new(warden).forget_me(record)
  end
end

Version data entries

43 entries across 43 versions & 8 rubygems

Version Path
devise-4.3.0 lib/devise/hooks/forgetable.rb
enju_leaf-1.2.1 vendor/bundle/ruby/2.3/gems/devise-4.2.1/lib/devise/hooks/forgetable.rb
devise-4.2.1 lib/devise/hooks/forgetable.rb
devise-4.2.0 lib/devise/hooks/forgetable.rb
devise-3.5.10 lib/devise/hooks/forgetable.rb
devise-4.0.3 lib/devise/hooks/forgetable.rb
devise-4.1.1 lib/devise/hooks/forgetable.rb
ish_lib_manager-0.0.1 test/dummy/vendor/bundle/ruby/2.3.0/gems/devise-4.1.0/lib/devise/hooks/forgetable.rb
devise-4.1.0 lib/devise/hooks/forgetable.rb
devise-3.5.9 lib/devise/hooks/forgetable.rb
devise-4.0.2 lib/devise/hooks/forgetable.rb
devise-4.0.1 lib/devise/hooks/forgetable.rb
devise-3.5.8 lib/devise/hooks/forgetable.rb
devise-3.5.7 lib/devise/hooks/forgetable.rb
devise-4.0.0 lib/devise/hooks/forgetable.rb
devise-4.0.0.rc2 lib/devise/hooks/forgetable.rb
devise-4.0.0.rc1 lib/devise/hooks/forgetable.rb
devise-3.5.6 lib/devise/hooks/forgetable.rb
devise-3.5.5 lib/devise/hooks/forgetable.rb
devise-3.5.4 lib/devise/hooks/forgetable.rb