Sha256: 9494e9c31f7464616c2e4f0ba8a5a00743daa8a8a4bc7ad2b7c25ac7f3e16b09
Contents?: true
Size: 441 Bytes
Versions: 16
Compression:
Stored size: 441 Bytes
Contents
module Workarea class RemoveAuthenticationTokensOnPasswordChanges include Sidekiq::Worker include Sidekiq::CallbacksWorker sidekiq_options( enqueue_on: { User => [:save], ignore_if: -> { new_record? || changes['password_digest'].blank? }, with: -> { [id] } }, unique: :until_executing ) def perform(id) User.find(id).authentication_tokens.destroy_all end end end
Version data entries
16 entries across 16 versions & 2 rubygems