email validator: fix undeliverable? method always returning false.

`undeliverable?` calls `smtp_enabled?` which we forgot to define. It
swallowed the error so it didn't fail but it always returned false.
This commit is contained in:
evazion
2020-03-27 12:46:56 -05:00
parent d24c746417
commit cbfa8c4904
2 changed files with 8 additions and 0 deletions

View File

@@ -63,6 +63,10 @@ module EmailValidator
"gmx.us" => "gmx.net",
}
def smtp_enabled?
Rails.env.production?
end
def normalize(address)
return nil unless address.count("@") == 1