style(rubocop): Style/NumericPredicate

This commit is contained in:
Adam Cooke
2024-02-10 22:59:30 +00:00
parent 7119e8642d
commit c558f1c69c
9 changed files with 11 additions and 11 deletions
+2 -2
View File
@@ -160,7 +160,7 @@ class Server < ApplicationRecord
total_outgoing += stat[:outgoing]
total_bounces += stat[:bounces]
end
total_outgoing == 0 ? 0 : (total_bounces / total_outgoing) * 100
total_outgoing.zero? ? 0 : (total_bounces / total_outgoing) * 100
end
end
@@ -221,7 +221,7 @@ class Server < ApplicationRecord
# Return the domain which can be used to authenticate emails sent from the given e-mail address.
#
# @param address [String] an e-mail address
#  @param address [String] an e-mail address
# @return [Domain, nil] the domain to use for authentication
def authenticated_domain_for_address(address)
return nil if address.blank?