Apply Rubocop Performance/StringReplacement (#23445)

th-downstream
Nick Schonning 2 years ago committed by GitHub
parent 67a6f688ca
commit fd5980fc35

@ -7,7 +7,7 @@ module EmailHelper
def email_to_canonical_email(str) def email_to_canonical_email(str)
username, domain = str.downcase.split('@', 2) username, domain = str.downcase.split('@', 2)
username, = username.gsub('.', '').split('+', 2) username, = username.delete('.').split('+', 2)
"#{username}@#{domain}" "#{username}@#{domain}"
end end

Loading…
Cancel
Save