removes devise-async for delayed devise emails
Custom overwrite of the devise implementation following https://github.com/plataformatec/devise#activejob-integration
This commit is contained in:
committed by
Julian Herrero
parent
23fcd78e6c
commit
84338592da
@@ -3,7 +3,7 @@ class User < ActiveRecord::Base
|
||||
include Verification
|
||||
|
||||
devise :database_authenticatable, :registerable, :confirmable, :recoverable, :rememberable,
|
||||
:trackable, :validatable, :omniauthable, :async, :password_expirable, :secure_validatable,
|
||||
:trackable, :validatable, :omniauthable, :password_expirable, :secure_validatable,
|
||||
authentication_keys: [:login]
|
||||
|
||||
acts_as_voter
|
||||
@@ -346,6 +346,10 @@ class User < ActiveRecord::Base
|
||||
followables.compact.map { |followable| followable.tags.map(&:name) }.flatten.compact.uniq
|
||||
end
|
||||
|
||||
def send_devise_notification(notification, *args)
|
||||
devise_mailer.send(notification, self, *args).deliver_later
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def clean_document_number
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
Devise::Async.setup do |config|
|
||||
if Rails.env.test? || Rails.env.development?
|
||||
config.enabled = false
|
||||
else
|
||||
config.enabled = true
|
||||
end
|
||||
config.backend = :delayed_job
|
||||
end
|
||||
# Devise::Async.setup do |config|
|
||||
# if Rails.env.test? || Rails.env.development?
|
||||
# config.enabled = false
|
||||
# else
|
||||
# config.enabled = true
|
||||
# end
|
||||
# config.backend = :delayed_job
|
||||
# end
|
||||
|
||||
Reference in New Issue
Block a user