Commit 2fd960ad authored by Dan Jensen's avatar Dan Jensen

Remove if blank conditions from email unsetters

The User model methods that unset each of the secondary email values
if they are blank. In other words, if blank set to blank. That is
clearly unnecessary, so this removes the blank conditions to simplify.
parent b9a1ede0
......@@ -2007,19 +2007,19 @@ class User < ApplicationRecord
end
def set_notification_email
if notification_email.blank? || verified_emails.exclude?(notification_email)
if verified_emails.exclude?(notification_email)
self.notification_email = nil
end
end
def set_public_email
if public_email.blank? || verified_emails.exclude?(public_email)
if verified_emails.exclude?(public_email)
self.public_email = ''
end
end
def set_commit_email
if commit_email.blank? || verified_emails.exclude?(commit_email)
if verified_emails.exclude?(commit_email)
self.commit_email = nil
end
end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment