Sha256: db8e1298300e5f322f3a3b27d4977dc29a073cd8c63deeb9063536c83ec8b6af

Contents?: true

Size: 513 Bytes

Versions: 76

Compression:

Stored size: 513 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

76 entries across 71 versions & 9 rubygems

Version Path
devise-3.2.3 lib/devise/hooks/trackable.rb
devise-3.2.2 lib/devise/hooks/trackable.rb
devise-3.2.1 lib/devise/hooks/trackable.rb
devise-3.1.2 lib/devise/hooks/trackable.rb
devise-3.0.4 lib/devise/hooks/trackable.rb
devise-2.2.8 lib/devise/hooks/trackable.rb
devise-3.2.0 lib/devise/hooks/trackable.rb
loyal_devise-2.2.6 lib/devise/hooks/trackable.rb
devise-3.1.1 lib/devise/hooks/trackable.rb
devise-3.1.0 lib/devise/hooks/trackable.rb
devise-2.0.6 lib/devise/hooks/trackable.rb
devise-2.1.4 lib/devise/hooks/trackable.rb
devise-2.2.7 lib/devise/hooks/trackable.rb
devise-3.0.3 lib/devise/hooks/trackable.rb
devise-3.1.0.rc2 lib/devise/hooks/trackable.rb
loyal_devise-2.2.5 lib/devise/hooks/trackable.rb
devise-2.2.6 lib/devise/hooks/trackable.rb
devise-3.0.2 lib/devise/hooks/trackable.rb
devise-3.0.1 lib/devise/hooks/trackable.rb
devise-2.2.5 lib/devise/hooks/trackable.rb