Sha256: f5c0e6b35a2cf9ef2706714d175be806551ab475c2585856b86c47356c1387f0

Contents?: true

Size: 510 Bytes

Versions: 39

Compression:

Stored size: 510 Bytes

Contents

# After each sign in, update sign in time, sign in count and sign in IP.
# This is only triggered when the user is explicitly set (with set_user)
# and on authentication. Retrieving the user from session (:fetch) does
# not trigger it.
Warden::Manager.after_set_user except: :fetch do |record, warden, options|
  if record.respond_to?(:update_tracked_fields!) && warden.authenticated?(options[:scope]) && !warden.request.env['devise.skip_trackable']
    record.update_tracked_fields!(warden.request)
  end
end

Version data entries

39 entries across 39 versions & 8 rubygems

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