1# frozen_string_literal: true 2 3module AsyncDeviseEmail 4 extend ActiveSupport::Concern 5 6 private 7 8 # Added according to https://github.com/plataformatec/devise/blob/7df57d5081f9884849ca15e4fde179ef164a575f/README.md#activejob-integration 9 def send_devise_notification(notification, *args) 10 return true unless can?(:receive_notifications) 11 12 devise_mailer.__send__(notification, self, *args).deliver_later # rubocop:disable GitlabSecurity/PublicSend 13 end 14end 15