mirror of
https://github.com/heartcombo/devise.git
synced 2022-11-09 12:18:31 -05:00
7 lines
318 B
Ruby
7 lines
318 B
Ruby
# After each sign in, update sign in time, sign in count and sign in IP.
|
|
Warden::Manager.after_set_user :except => :fetch do |record, warden, options|
|
|
scope = options[:scope]
|
|
if record.respond_to?(:update_tracked_fields!) && warden.authenticated?(scope)
|
|
record.update_tracked_fields!(warden.request)
|
|
end
|
|
end
|