Our mailing queue is getting looped when a user is deleted. Looks like the mailer action still gets evaluated, I checked if the mailing was returning nil and indeed it does.
I could check if the user exists in the mailer but it defeats the purpose of the library.
undefined methodset_login_bypass_token' for nil:NilClass`
before_drip do |_drip, mailing|
if mailing.user.nil?
mailing.subscription.end!("User not found")
throw(:abort)
end
end
def job_available_notification(mailing)
@job = mailing.subscriber
@action_url = job_url(@job, login_bypass_token: @user.set_login_bypass_token)
mail(to: @user.email, subject: "Nuevo trabajo disponible")
end
Our mailing queue is getting looped when a user is deleted. Looks like the mailer action still gets evaluated, I checked if the mailing was returning nil and indeed it does.
I could check if the user exists in the mailer but it defeats the purpose of the library.
undefined method
set_login_bypass_token' for nil:NilClass`