use match if possible
This commit is contained in:
parent
9b324614b8
commit
f7ebbdc7c2
2 changed files with 2 additions and 2 deletions
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue