summaryrefslogtreecommitdiff
path: root/app/models/email.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/models/email.rb')
-rw-r--r--app/models/email.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/app/models/email.rb b/app/models/email.rb
index 3ce6e792fa8..bfbdccef9a3 100644
--- a/app/models/email.rb
+++ b/app/models/email.rb
@@ -12,7 +12,7 @@ class Email < ActiveRecord::Base
scope :confirmed, -> { where.not(confirmed_at: nil) }
- after_commit :update_invalid_gpg_signatures, if: -> { previous_changes.key?('confirmed_at') }
+ after_commit :update_invalid_gpg_signatures, if: -> { previous_changes.key?("confirmed_at") }
devise :confirmable
self.reconfirmable = false # currently email can't be changed, no need to reconfirm
@@ -24,7 +24,7 @@ class Email < ActiveRecord::Base
end
def unique_email
- self.errors.add(:email, 'has already been taken') if User.exists?(email: self.email)
+ errors.add(:email, "has already been taken") if User.exists?(email: email)
end
def accept_pending_invitations!