Skip to content

Commit

Permalink
fix(user model): email digest hash not working
Browse files Browse the repository at this point in the history
  • Loading branch information
stakach committed Aug 19, 2021
1 parent b60ccdf commit c6101ff
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/models/user.rb
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ def build_name

before_save :hash_email, if: ->(model) { model.email.present? }
def hash_email
self.email_digest = Digest::MD5.hexdigest(model.email.downcase)
self.email_digest = Digest::MD5.hexdigest(self.email.downcase)
end

# PASSWORD ENCRYPTION::
Expand Down

0 comments on commit c6101ff

Please sign in to comment.