use match if possible

This commit is contained in:
clemkeirua 2020-09-24 15:12:21 +02:00 committed by Keirua (Rebase PR Action)
parent 9b324614b8
commit f7ebbdc7c2
2 changed files with 2 additions and 2 deletions

View file

@ -9,7 +9,7 @@ class ApplicationMailer < ActionMailer::Base
end
rescue_from Net::SMTPServerBusy do |error|
if error.message =~ /unexpected recipients/
if /unexpected recipients/.match?(error.message)
message.perform_deliveries = false
end
end

View file

@ -10,7 +10,7 @@ class DeviseUserMailer < Devise::Mailer
end
rescue_from Net::SMTPServerBusy do |error|
if error.message =~ /unexpected recipients/
if /unexpected recipients/.match?(error.message)
message.perform_deliveries = false
end
end